jquery.superslide.js使用方法
2016-12-10 18:45
513 查看
一,superslide.js是轮播插件元素
二,必须参数设置(详细参数设置)
三,使用实例:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Language" content="zh-CN">
<meta name="Keywords" content="SuperSlide,jQuery-实用焦点图">
<meta name="Description" content="SuperSlide,jQuery-实用焦点图">
<title>SuperSlide - 实用焦点图</title>
<script src="http://libs.baidu.com/jquery/1.4.2/jquery.min.js"></script>
<script src="jquery.SuperSlide.2.1.1.js"></script>
</head>
<body>
<style type="text/css">
*{margin:0; padding:0; list-style:none; }
body{ background:#fff; font:normal 12px/22px 宋体; }
img{ border:0; }
a{ text-decoration:none; color:#333; }
a:hover{ color:#1974A1; }
.focusBox { position: relative; width: 320px; height: 240px; overflow: hidden; font: 12px/1.5 Verdana, Geneva, sans-serif; text-align: left; background: white; }
.focusBox .pic img { width: 320px; height: 240px; display: block; }
.focusBox .txt-bg { position: absolute; bottom: 0; z-index: 1; height: 36px; width:100%; background: #333; filter: alpha(opacity=40); opacity: 0.4; overflow: hidden; }
.focusBox .txt { position: absolute; bottom: 0; z-index: 2; height: 36px; width:100%; overflow: hidden; }
.focusBox .txt li{ height:36px; line-height:36px; position:absolute; bottom:-36px;}
.focusBox .txt li a{ display: block; color: white; padding: 0 0 0 10px; font-size: 12px; font-weight: bold; text-decoration: none; }
.focusBox .num { position: absolute; z-index: 3; bottom: 8px; right: 8px; }
.focusBox .num li{ float: left; position: relative; width: 18px; height: 15px; line-height: 15px; overflow: hidden; text-align: center; margin-right: 1px; cursor: pointer; }
.focusBox .num li a,.focusBox .num li span { position: absolute; z-index: 2; display: block; color: white; width: 100%; height: 100%; top: 0; left: 0; text-decoration: none; }
.focusBox .num li span { z-index: 1; background: black; filter: alpha(opacity=50); opacity: 0.5; }
.focusBox .num li.on a,.focusBox .num a:hover{ background:#f60; }
</style>
<div class="focusBox" style="margin:0 auto">
<ul class="pic">
<li><a href="#" target="_blank"><img src="images/1.jpg"/></a></li>
<li><a href="#" target="_blank"><img src="images/2.jpg"/></a></li>
<li><a href="#" target="_blank"><img src="images/3.jpg"/></a></li>
<li><a href="#" target="_blank"><img src="images/4.jpg"/></a></li>
</ul>
<div class="txt-bg"></div>
<div class="txt">
<ul>
<li><a href="#">SuperSlid图Quiet</a></li>
<li><a href="#">SuperSlid图DoubleLi</a></li>
<li><a href="#">SuperSlid练习曲</a></li>
<li><a href="#">SuperSlid夜莺</a></li>
</ul>
</div>
<ul class="num">
<li><a>1</a><span></span></li>
<li><a>2</a><span></span></li>
<li><a>3</a><span></span></li>
<li><a>4</a><span></span></li>
</ul>
</div>
<script type="text/javascript">
jQuery(".focusBox").slide({
titCell : ".num li",
mainCell : ".pic",
effect : "fold",
autoPlay : true,
trigger : "click",
startFun : function (i) {
jQuery(".focusBox .txt li").eq(i).animate({
"bottom" : 0
}).siblings().animate({
"bottom" : -36
});
}
});
</script>
</body>
</html>
二,必须参数设置(详细参数设置)
三,使用实例:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Language" content="zh-CN">
<meta name="Keywords" content="SuperSlide,jQuery-实用焦点图">
<meta name="Description" content="SuperSlide,jQuery-实用焦点图">
<title>SuperSlide - 实用焦点图</title>
<script src="http://libs.baidu.com/jquery/1.4.2/jquery.min.js"></script>
<script src="jquery.SuperSlide.2.1.1.js"></script>
</head>
<body>
<style type="text/css">
*{margin:0; padding:0; list-style:none; }
body{ background:#fff; font:normal 12px/22px 宋体; }
img{ border:0; }
a{ text-decoration:none; color:#333; }
a:hover{ color:#1974A1; }
.focusBox { position: relative; width: 320px; height: 240px; overflow: hidden; font: 12px/1.5 Verdana, Geneva, sans-serif; text-align: left; background: white; }
.focusBox .pic img { width: 320px; height: 240px; display: block; }
.focusBox .txt-bg { position: absolute; bottom: 0; z-index: 1; height: 36px; width:100%; background: #333; filter: alpha(opacity=40); opacity: 0.4; overflow: hidden; }
.focusBox .txt { position: absolute; bottom: 0; z-index: 2; height: 36px; width:100%; overflow: hidden; }
.focusBox .txt li{ height:36px; line-height:36px; position:absolute; bottom:-36px;}
.focusBox .txt li a{ display: block; color: white; padding: 0 0 0 10px; font-size: 12px; font-weight: bold; text-decoration: none; }
.focusBox .num { position: absolute; z-index: 3; bottom: 8px; right: 8px; }
.focusBox .num li{ float: left; position: relative; width: 18px; height: 15px; line-height: 15px; overflow: hidden; text-align: center; margin-right: 1px; cursor: pointer; }
.focusBox .num li a,.focusBox .num li span { position: absolute; z-index: 2; display: block; color: white; width: 100%; height: 100%; top: 0; left: 0; text-decoration: none; }
.focusBox .num li span { z-index: 1; background: black; filter: alpha(opacity=50); opacity: 0.5; }
.focusBox .num li.on a,.focusBox .num a:hover{ background:#f60; }
</style>
<div class="focusBox" style="margin:0 auto">
<ul class="pic">
<li><a href="#" target="_blank"><img src="images/1.jpg"/></a></li>
<li><a href="#" target="_blank"><img src="images/2.jpg"/></a></li>
<li><a href="#" target="_blank"><img src="images/3.jpg"/></a></li>
<li><a href="#" target="_blank"><img src="images/4.jpg"/></a></li>
</ul>
<div class="txt-bg"></div>
<div class="txt">
<ul>
<li><a href="#">SuperSlid图Quiet</a></li>
<li><a href="#">SuperSlid图DoubleLi</a></li>
<li><a href="#">SuperSlid练习曲</a></li>
<li><a href="#">SuperSlid夜莺</a></li>
</ul>
</div>
<ul class="num">
<li><a>1</a><span></span></li>
<li><a>2</a><span></span></li>
<li><a>3</a><span></span></li>
<li><a>4</a><span></span></li>
</ul>
</div>
<script type="text/javascript">
jQuery(".focusBox").slide({
titCell : ".num li",
mainCell : ".pic",
effect : "fold",
autoPlay : true,
trigger : "click",
startFun : function (i) {
jQuery(".focusBox .txt li").eq(i).animate({
"bottom" : 0
}).siblings().animate({
"bottom" : -36
});
}
});
</script>
</body>
</html>
相关文章推荐
- 【js与jquery】jquery的一个通用的专门用于遍历的全局方法$.each()的使用
- reset是js的方法,在jquery中使用应注意
- jquery 和其他js框架同时使用的不兼容问题解决方法
- 使用jQuery动态加载js脚本文件的方法
- jQuery对象和DOM对象转换,解决jQuery对象不能使用js方法的问题
- 按需加载图片的 jQuery 插件 lazyload.js 使用方法详解
- SlidesJS基本使用方法和官方文档解释 【Jquery幻灯片插件 Jquery相册插件】
- Jquery 模板插件 jquery.tmpl.js 的使用方法(1):基本语法,绑定,each循环,ajax获取json数据
- SlidesJS基本使用方法和官方文档解释 【Jquery幻灯片插件 Jquery相册插件】
- 使用jQuery动态加载js脚本文件的方法
- 缓冲加载图片的 jQuery 插件 lazyload.js 使用方法详解
- 在java程序中使用jQuery抓取网页的新方法(java调用js解析引擎)
- jquery.nicescroll.min.js滚动条使用方法
- 缓冲加载图片的 jQuery 插件 lazyload.js 使用方法详解
- js原生态函数中使用jQuery中的 $(this)无效的解决方法
- 使用JS/Jquery获得父窗口的几个方法(笔记)
- SlidesJS基本使用方法和官方文档解释 【Jquery幻灯片插件 Jquery相册插件】
- jquery.cookie.js源码和使用方法
- JQuery缓冲加载图片插件lazyload.js的使用方法
- Jquery 模板插件 jquery.tmpl.js 的使用方法(2):嵌套each循环,temp调用(使用预编译的模板缓存)