用js效果做的簡單焦點圖

來源:互聯網
上載者:User

標籤:

 

/*js代碼*/

 

<script src="js/js/myfocus-2.0.1.min.js" type="text/javascript"></script>

/*選擇需要的效果*/

<script src="js/js/mf-pattern/mF_YSlider.js" type="text/javascript"></script>
<link href="js/js/mf-pattern/mF_YSlider.css" type="text/css" rel="stylesheet" />


<script type="text/javascript">
myFocus.set({id:‘picBox‘})  /*調用焦點圖中的id*/

 

pattern:‘mF_fancy‘; //對應的風格

time:3;//切換圖片的時間

width:1000;

height:600;

txtHeight:‘default‘//文字層高度設定:‘default‘為預設高度:0為隱藏


</script>

 

/*html代碼*/

<div class="ad" id="picBox">
<div class="loading"><img src="img/loading.gif" alt="圖片載入中" /></div>
<div class="pic">
<ul>
<li><a><img src="img/ad2.jpg"/></a></li>
<li><img src="img/ad3.jpg"/></li>
<li><img src="img/ad4.jpg"/></li>

</ul>
</div>
</div>
</div>

 

/*css代碼*/

.ad{height: 310px;
overflow: hidden;  
}

 myfocus檔案中可下載

用js效果做的簡單焦點圖

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.