Home  >  Article  >  Web Front-end  >  JQuery loop scrolling picture code_jquery

JQuery loop scrolling picture code_jquery

WBOY
WBOYOriginal
2016-05-16 17:58:291280browse
复制代码 代码如下:

function refresh() {
var s = $(".box1");
if (!s.is(":animated"))
$(".box1").animate({ marginLeft: "0px" }, "slow", function () {
$('.box1 img:first').before($('.box1 img:last'));
$(".box1").css("margin-left", "-206px");
});
}


.box1
{
width:1200px;
overflow:hidden;
margin-left:-206px;
}
.frame
{
width:620px;
overflow:hidden;
}

图片宽度默认206px,没设定
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn