当前位置: 移动技术网 > IT编程>开发语言>JavaScript > jquery垂直公告滚动实现代码

jquery垂直公告滚动实现代码

2019年03月19日  | 移动技术网IT编程  | 我要评论

代码如下:


<!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "https://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script src="jquery-1.7.2.js"></script>
<style>
*{
padding:0px;
margin:0px;
}
ul{
list-style:none;
}
li{
line-height:30px;
}
</style>
</head>

<body>
<ul>
<li>1111</li>
<li>22222</li>
<li>3333</li>
<li>44444</li>
<li>5555</li>
<li>66666</li>
</ul>
<script>
setinterval(function(){
var newlist=$('ul :first').clone(true);
$('ul').append(newlist);
$('ul :first').remove();
},2000);

</script>
</body>
</html>

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网