<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=no"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<title>药伙伴</title>
<style type="text/css">
.news_UL{width: 100%;overflow: hidden;margin-top: 16px; height: 136px}
.news_UL li{width: 100%;overflow: hidden;}
.news_UL li a{width: 100%;height: 34px;display:block;line-height: 34px;color: #7E7E80;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}
.news_UL li a:hover{color: #333333; text-decoration: underline;}
</style>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(function(){
var timer = setInterval('autoScroll(".news_UL")', 3000);
$(".news_UL").hover(function(){
clearInterval(timer);
},function(){
timer = setInterval('autoScroll(".news_UL")', 3000);
})
})
function autoScroll(obj) {
$(obj).find("ul").animate({marginTop: "-34px"}, 500,function() {
$(this).css({marginTop: "0px"}).find("li:first").appendTo(this);
})
}
</script>
</head>
<body>
<div class="news_UL h136">
<ul>
<li>
<a href="">
优瑞英语新闻优瑞英语新闻一
</a>
</li>
<li>
<a href="">
优瑞英语新闻优瑞英语新闻二
</a>
</li>
<li>
<a href="">
优瑞英语新闻优瑞英语新闻三
</a>
</li>
</ul>
</div>
</body>
</html>
记得加载 jquery.js
滚动 公告
本文转载:CSDN博客