首页前端开发HTMLhtml京东自动轮播代码

html京东自动轮播代码

时间2023-11-11 18:49:03发布访客分类HTML浏览288
导读:HTML京东自动轮播代码 京东自动轮播 .container{ width: 600px; height: 400px; margin: 0 auto; position: relative; overflow: hidden; backg...

HTML京东自动轮播代码

	京东自动轮播	.container{
    	width: 600px;
    	height: 400px;
    	margin: 0 auto;
    	position: relative;
    	overflow: hidden;
    	background-color: #f2f2f2;
}
.img-list{
    	width: 3000px;
    	height: 400px;
    	position: absolute;
    	top: 0;
    	left: 0;
}
.img-list li{
    	float: left;
    	width: 600px;
    	height: 400px;
}
.img-list li img{
    	display: block;
    	width: 100%;
    	height: 100%;
}
			$(function(){
    	var timer = null;
    	var count = 0;
    	timer = setInterval(play, 3000);
	function play(){
    count++;
if(count == 5){
    	count = 0;
}
$('.img-list').animate({
left: -count*600}
    , 500);
	}
	$('.container').hover(function(){
    clearInterval(timer);
	}
, function(){
    timer = setInterval(play, 3000);
	}
    );
}
    );
    		

声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!


若转载请注明出处: html京东自动轮播代码
本文地址: https://pptw.com/jishu/534897.html
css 去掉图片背景图片 css 去掉td的边距

游客 回复需填写必要信息