600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > html图片自动滚动播放器 jQuery+css实现图片滚动效果(附源码)

html图片自动滚动播放器 jQuery+css实现图片滚动效果(附源码)

时间:2020-03-22 10:42:34

相关推荐

html图片自动滚动播放器 jQuery+css实现图片滚动效果(附源码)

bxCarousel参数说明:

move:每次滚动移动图片的数量,默认为4。

display_num:展示图片的数量,默认为4。

speed:图片滚动速度,默认为500毫秒。

margin:图片间的间距,默认为0。

auto:是否自动滚动,默认为false。

auto_interval:当设为自动滚动时,每次滚动的时间间隔(毫秒),默认为2000毫秒即2秒。

auto_dir:自动滚动的方向,默认为next,你可以试下prev。

next_image:向右滚方向按钮图片,可以用CSS设置。

prev_image:向左滚方向按钮图片,可以用CSS设置。

auto_hover:滚动时,鼠标滑上图片时是否停止滚动,默认为false。

controls:是否显示左右滚动按钮图片,默认为true。

jQuery+CSS实现的图片滚动效果

ul{margin:0;padding:0;}

.demo{width: 650px;height: 134px;margin: 60px auto;clear: both;position: relative;border:1px solid #d3d3d3}

.bx_wrap {margin-left: 10px; margin-top:10px}

.bx_wrap ul img { border: 2px solid #ddd; }

.bx_wrap ul li{text-align:center}

.bx_wrap ul li a:hover{text-decoration:none; color:#f30}

.bx_wrap a.prev {width:20px;height:24px;line-height:24px;outline-style:none;outline-width: 0;position:absolute; top:45px; left:-2px; text-indent:-999em; background: url(img/arr_left.gif) no-repeat;}

.bx_wrap a.next {width:20px;height:24px;line-height:24px; left:626px;position: absolute;top:45px; text-indent:-999em; background:url(img/arr_right.gif) no-repeat;}

$(function(){

$('#demo1').bxCarousel({

display_num: 4,

move: 1,

auto: true,

controls: false,

margin: 10,

auto_hover: true

});

$('#demo2').bxCarousel({

display_num: 4,

move: 4,

margin: 10

});

});

helloweba

jQuery+CSS实现的图片滚动效果

图片1

图片2

图片3

图片4

图片5

图片6

图片7

图片1

图片2

图片3

图片4

图片5

图片6

图片7

图片1

图片2

图片3

图片4

图片5

图片6

Powered by 允许转载、修改和使用本站的DEMO,但请注明出处:

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。