<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>滚动条</title>
<style>
.all_list_div{overflow:hidden;height:120px;float:left; }
.span1 a{color: #b28a64;}
.all_list_div{height: 175px;overflow: hidden;}
</style>
<script src="js/jquery.js"></script>
</head>
<body>
<div class="all_list_div" id="all_list_div">
<ul class="ul_list"><ul class="ul_list"><li style="white-space:nowrap;"><span class="span1">恭喜 <a href="javascript:;">1*** </a></span><span class="span2">宝马 </span><span class="span3">2018-11-12 16:03:38</span></li></ul>
</div>
<script type="text/javascript">
var dis=0;
function autoscall(){
dis++;
$(".all_list_div").scrollTop(dis);
if($(".all_list_div").scrollTop()>=$(".ul_list").height-$(".all_list_div").height()){
dis=0;
}
};
$(function () {
setInterval("autoscall()",80);
})
</script>
</body>
</html>
网友评论