这是我之前用的时候从一个模板中下载下来用的,现在又用到了,我又重新找了一遍,为防止我下次用到忘记,特写下此文:

下载插件:jquery-2.1.4.min.jsslider.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="data: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="data: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="data: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="data: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="data: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:;cursor: pointer;opacity:;filter: alpha(opacity=0);-webkit-transition: all .3s ease;border-radius: 35px;}
.flex-direction-nav .flex-next {background-position: 0 -70px;right:;}
.flex-direction-nav .flex-prev {left:;}
.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:;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:;*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;}

html渐隐轮播的更多相关文章

  1. Jquery插件---渐隐轮播

    //需求:打开网页时,每秒钟自动切换下一张图片内容.也可以用鼠标点导航按钮进行图片切换 //代码如下 <!DOCTYPE html> <html lang="en" ...

  2. jquery渐隐轮播

    html <body> <div id="banner"> <div id="banner_bg"></div> ...

  3. Javascript轮播 支持平滑和渐隐两种效果(可以只有两张图)

    先上两种轮播效果:渐隐和移动   效果一:渐隐 1 2 3 4 效果二:移动 1 2 3 4 接下来,我们来大致说下整个轮播的思路: 一.先来看简单的,移动的,先上来一个图----移动效果图: 说明: ...

  4. Javscript轮播 支持平滑和渐隐两种效果(可以只有两张图)

    原文:Javscript轮播 支持平滑和渐隐两种效果(可以只有两张图) 先上两种轮播效果:渐隐和移动   效果一:渐隐 1 2 3 4 效果二:移动 1 2 3 4 接下来,我们来大致说下整个轮播的思 ...

  5. Javascript轮播 支持平滑和渐隐两种效果

    Javascript轮播 支持平滑和渐隐两种效果 先上两种轮播效果:渐隐和移动   效果一:渐隐 1 2 3 4 效果二:移动 1 2 3 4 接下来,我们来大致说下整个轮播的思路: 一.先来看简单的 ...

  6. 基于JQuery的渐隐渐现轮播

    <div id="ads"> <div> <!--轮播图片--> <ul> <li><a href="# ...

  7. js渐隐渐现透明度变化淡入淡出轮播图

    js渐隐渐现透明度变化淡入淡出轮播图.焦点图 一些广告banner展示常见. (附件) <!DOCTYPE html> <html> <head> <meta ...

  8. Js 图片轮播渐隐效果

    <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <m ...

  9. PgwSlideshow-基于Jquery的图片轮播插件

    0 PgwSlideshow简介 PgwSlideshow是一款基于Jquery的图片轮播插件,基本布局分为上下结构,上方为大图轮播区域,用户可自定义图片轮播切换的间隔时间,也可以通过单击左右方向按键 ...

随机推荐

  1. css z-index详解

    写css z-index的时候经常会出现很多莫名其妙的问题,下面对z-index属性做彻底的剖析,本文参考了<一个css中z-index的用法>,并做了很多demo,方便了解z-index ...

  2. Android(java)学习笔记151: SurfaceView使用

    1.SurfaceView简介       在一般的情况下,应用程序的View都是在相同的GUI线程(UI主线程)中绘制的.这个主应用程序线程同时也用来处理所有的用户交互(例如,按钮单击或者文本输入) ...

  3. Android_Service

    xml文件: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:t ...

  4. mysql内存使用情况

    可以直接使用top命令后,查看%MEM的内容.可以选择按进程查看或者按用户查看,如想查看oracle用户的进程内存使用情况的话可以使用如下的命令: (1)top top命令是Linux下常用的性能分析 ...

  5. Linux下pcapy的安装问题

    在安装pcapy包的时候 cd pcapy-0.10.8/ python setup.py install 报错 error trying to exec ‘cc1plus’: execvp: No ...

  6. day0

    /* 考前最后一天了 由于下午赶路 就放到上午发了 早晨浏览博客 上午浏览博客 感谢学弟为我写的博客233 很开心认识你们这一群人 嗯 最后一天了 就要说再见了 大家加油吧 ^ ^ */

  7. 【Python】分布式任务队列Celery使用参考资料

    Python-Celery Homepage | Celery: Distributed Task Queue User Guide - Celery 4.0.2 documentation Task ...

  8. zzzzw_在线考试系统②管理员篇章

    今天实现了管理的功能,谈谈遇到的问题!我先上图 图一   管理员的数据库 在action中访问Servlet API的非IoC方式之一:使用apache.struts2.ServletActionCo ...

  9. 20151221jqueryUI---日历UI代码备份

    $(function () { $('#search_button').button({ icons : { primary : 'ui-icon-search', }, }); $('#reg'). ...

  10. box-shadow 与 filter:drop-shadow 详解及奇技淫巧

    box-shadow 在前端的 CSS 编写工作想必十分常见.但是 box-shadow 除去它的常规用法,其实还存在许多不为人知的奇技淫巧. 喜欢 markdown 版本的可以戳这里. box-sh ...