- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>开拓者博客</title>
- <!-- jq cdn镜像库 www.150643.com-->
- <script src="http://code.jquery.com/jquery-2.2.3.js" integrity="sha256-laXWtGydpwqJ8JA+X9x2miwmaiKhn8tVmOVEigRNtP4=" crossorigin="anonymous"></script>
- </head>
- <body>
- <!-- div -->
- <div class="scroll-wrap" style="height: 16px; overflow: hidden;">
- <ul class="scroll-con fn-left" style="margin-top: 0px;">
- <li style="height: 16px; line-height: 16px; overflow: hidden;">
- <a href="https://150643.com">潍坊网站建设_宏源网络</a>
- </li>
- <li style="height: 16px; line-height: 16px; overflow: hidden;">
- <a href="https://150643.com">潍坊网站建设_宏源网络2</a>
- </li>
- <li style="height: 16px; line-height: 16px; overflow: hidden;">
- <a href="https://150643.com">潍坊网站建设_宏源网络3</a>
- </li>
- <li style="height: 16px; line-height: 16px; overflow: hidden;">
- <a href="https://150643.com">潍坊网站建设_宏源网络4</a>
- </li>
- </ul>
- </div>
- <!-- div end -->
- </body>
- <script type="text/javascript">
- /*公告滚动*/
- $(function(){
- var len = $(".scroll-con li").length;
- console.log(len);
- if(len > 1){
- textRoll=function(){
- $(".scroll-wrap").find(".scroll-con").animate({
- marginTop : "-16px"
- },500,function(){
- $(this).css({marginTop : "0px"}).find("li:first").appendTo(this);
- });
- };
- var roll= setInterval('textRoll()',2000);
- $(".scroll-con li").hover(function() {
- clearInterval(roll);
- }).mouseout(function(){
- roll= setInterval('textRoll()',5000);
- });
- }
- })
- </script>
- </html>

我的微信
这是我的微信扫一扫