html漸隱輪播,html漸隱

來源:互聯網
上載者:User

html漸隱輪播,html漸隱

這是我之前用的時候從一個模板中下載下來用的,現在又用到了,我又重新找了一遍,為防止我下次用到忘記,特寫下此文:

下載外掛程式:jquery-2.1.4.min.js和slider.js

首頁輪播頁面首頁index.html:

<!doctype html><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><link href="css/banner.css" rel="stylesheet"></head><body><div id="banner_tabs" class="flexslider">    <ul class="slides">        <li>                    <a title="" target="_blank" href="#">            <img width="1010" height="450" alt="" style="background: url(images/bgi1.jpg) no-repeat center;" src="images/alpha.png">                    </a>        </li>        <li>                    <a title="" href="#">            <img width="1010" height="450" alt="" style="background: url(images/bgi2.jpg) no-repeat center;" src="images/alpha.png">                    </a>        </li>        <li>                    <a title="" href="#">            <img width="1010" height="450" alt="" style="background: url(images/bgi3.jpg) no-repeat center;" src="images/alpha.png">                    </a>        </li>        <li>                    <a title="" href="#">            <img width="1010" height="450" alt="" style="background: url(images/bgi4.jpg) no-repeat center;" src="images/alpha.png">                    </a>        </li>        <li>                    <a title="" href="#">            <img width="1010" height="450" alt="" style="background: url(images/bgi5.jpg) no-repeat center;" src="images/alpha.png">                    </a>        </li>    </ul>    <ul class="flex-direction-nav">        <li><a class="flex-prev" href="javascript:;">Previous</a></li>        <li><a class="flex-next" href="javascript:;">Next</a></li>    </ul>    <ol id="bannerCtrl" class="flex-control-nav flex-control-paging">        <li><a>1</a></li>        <li><a>2</a></li>        <li><a>3</a></li>        <li><a>4</a></li>        <li><a>5</a></li>    </ol></div>    <script src="js/jquery-2.1.4.min.js"></script><script src="js/slider.js"></script><script type="text/javascript">$(function() {    var bannerSlider = new Slider($('#banner_tabs'), {        time: 3600,        delay: 400,        event: 'hover',        auto: true,        mode: 'fade',        controller: $('#bannerCtrl'),        activeControllerCls: 'active'    });    $('#banner_tabs .flex-prev').click(function() {        bannerSlider.prev()    });    $('#banner_tabs .flex-next').click(function() {        bannerSlider.next()    });})</script></body></html>

html的樣式banner.css

            /*index.html輪播*/ul{list-style-type: none;}ul li{list-style-type: none;}.flexslider { width:1200px; height:400px;position:relative; overflow:hidden;margin:0 auto;}.flexslider .slides li {width: 100%;height: 100%;list-style-type: none;}.flex-direction-nav a {width: 70px;height: 70px;line-height: 99em;overflow: hidden;margin: -35px 0 0;display: block;background: url(../images/ad_ctr.png) no-repeat;    position: absolute;top: 50%;z-index: 10;cursor: pointer;opacity: 0;filter: alpha(opacity=0);-webkit-transition: all .3s ease;border-radius: 35px;}.flex-direction-nav .flex-next {background-position: 0 -70px;right: 0;}.flex-direction-nav .flex-prev {left: 0;}.flexslider:hover .flex-next {opacity: 0.8;filter: alpha(opacity=25);}.flexslider:hover .flex-prev {opacity: 0.8;filter: alpha(opacity=25);}.flexslider:hover .flex-next:hover,.flexslider:hover .flex-prev:hover {opacity: 1;filter: alpha(opacity=50);}.flex-control-nav {width: 100%;position: absolute;bottom: 10px;text-align: center;}.flex-control-nav li {margin: 0 2px;display: inline-block;zoom: 1;*display: inline;}.flex-control-paging li a {background: url(../images/dot.png) no-repeat 0 -16px;display: block;height: 16px;overflow: hidden;text-indent: -99em;width: 16px;cursor: pointer;}.flex-control-paging li a.flex-active,.flex-control-paging li.active a {background-position: 0 0;}.flexslider .slides a img {width: 100%;display: block;}

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.