基于jQuery实现的单行公告活动轮播效果
时间:2022-06-25 17:03:03 编辑:袖梨 来源:一聚教程网
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <div class= "lunbo123" style= "position:relative;overflow: hidden;background-color:white" ;= "" > <ul id= "myul" style= "margin:6px;padding:0px;position:absolute; height: auto;" > <li> <a href= "" style= " rel=" external= "" nofollow "=" " rel=" external nofollow " text-decoration:=" " none;color:=" " #000000;=" " " = "" > <span style= "height:36px ; line-height: 36px;" >公告test1 </span> </a> <br> </li> <li> <a href= "" style= " rel=" external= "" nofollow "=" " rel=" external nofollow " text-decoration:=" " none;color:=" " #000000;=" " " = "" > <span style= "height:36px ; line-height: 36px;" >活动test2 </span> </a> <br> </li> </ul> </div> <script src= "//cdn.boot<a href=" http:= "" www.111com.net= "" cssdiv= "" css.html "=" " target=" _blank ">css</a>.com/jquery/2.2.2/jquery.js" ></script> <script> function lunbo123(id, height) { var ul = $(id); var liFirst = ul.find( 'li:first' ); $(id).animate({ top: height }).animate({ "top" : 0 }, 0, function () { var clone = liFirst.clone(); $(id).append(clone); liFirst.remove(); }) } setInterval( "lunbo123('#myul','-45px')" , 2500) </script> <style> #myul { list-style-type: none; font-size: 20px; } </style> |
相关文章
- 《弓箭传说2》新手玩法介绍 01-16
- 《地下城与勇士:起源》断桥烟雨多买多送活动内容一览 01-16
- 《差不多高手》醉拳龙技能特点分享 01-16
- 《鬼谷八荒》毕方尾羽解除限制道具推荐 01-16
- 《地下城与勇士:起源》阿拉德首次迎新春活动内容一览 01-16
- 《差不多高手》情圣技能特点分享 01-16