标签:
cssSlidy是一款支持手机移动端的焦点图轮播插件,支持标题设置,滑动动画,间隔时间等。
<div id="slidy-container"> <figure id="slidy"> <a href=‘#‘ target=‘_blank‘><img src="img/2.jpg" alt="jQuery.nicescroll美化滚动条" data-caption="jQuery.nicescroll美化滚动条"></a> <a href=‘#‘ target=‘_blank‘><img src="img/4.jpg" alt="jQuery仿淘宝商品多属性查询" data-caption="jQuery仿淘宝商品多属性查询"></a> <a href=‘#‘ target=‘_blank‘><img src="img/3.jpg" alt="jQuery结合elevateZoom演示多种放大镜效果" data-caption="jQuery结合elevateZoom演示多种放大镜效果"></a> <a href=‘#‘ target=‘_blank‘><img src="img/2.jpg" alt="百度编辑器ueditor" data-caption="百度编辑器ueditor"></a> </figure> </div>
cssSlidy({ timeOnSlide: 5, timeBetweenSlides: .5, slidyContainerSelector: ‘#slidy-container‘, slidySelector: ‘#slidy‘, captionSource: ‘data-caption‘, captionBackground: ‘rgba(0,0,0,0.5)‘, captionColor: ‘#ff0‘, captionFont: ‘Raleway, Brittanic Bold, Hevetica, sans-serif‘, captionPosition: ‘bottom‘, captionAppear: ‘perm‘, captionSize: ‘16px‘, captionPadding: ‘1em‘, /*fallbackFunction: function(){ alert("Oh noes! You can‘t animate!"); },*/ cssAnimationName: ‘slidy‘ });
参数 | 描述 | 默认值 |
timeOnSlide | 滑动时间 ,单位秒 | 3 |
timeBetweenSlides | 间隔时间 ,单位秒 | 1 |
slidyContainerSelector | 滑动目标容器 | #slidy-container |
slidySelector | 滑动目标每个图片外选择器 | #slidy |
slidyDirection | 滑动方向, left, right | left |
fallbackFunction | 滑动回调 | function() {} |
cssAnimationName | css动画名称 | slidy |
captionSource | 标题来源 | data-caption |
captionBackground | 标题背景色 | rgba(0,0,0,0.3) |
captionColor | 标题颜色 | #fff |
captionFont | 标题字体 | Avenir, Avenir Next, Droid Sans, DroidSansRegular, Corbel, Tahoma, Geneva, sans-serif |
captionPosition | 标题位置 | bottom |
captionAppear | 标题动画方式 options: slide, perm, fade | slide |
captionSize | 标题字体大小 | 1.6rem |
captionPadding | 标题间隔 | 0.6rem |
标签:
原文地址:http://www.cnblogs.com/niuboren/p/5820463.html