仿新浪体育新闻文字滚动显示特效,这个选项卡兼容多种主流浏览器,几个选项定时切换显示特效,结合自己的需求来修改即可。
<style type="text/css"> td { font-size: 12px;border-right: medium none; padding-right: 0px; border-top: medium none; padding-left: 0px; padding-bottom: 0px; margin: 0px; border-left: medium none; paddding-top: 0px; border-bottom: medium none } .NUM1 {color:#fff; width:80px; height:22px; cursor:pointer;} .NUM2 {color: #fff; width:80px; height:22px; cursor:pointer; background:url(/img/20240517_www_wuming_ren_26.gif) no-repeat; width:80px;} .num{text-align:center;background:url(/img/20240517_www_wuming_ren_27.jpg) no-repeat; margin-left:1px; font-weight:bold; font-family:SimHei; width:318px; height:22px; overflow:hidden;} .num{*position:relative; top:-1px;} #main a:link{color:#000; text-decoration:none;} #main a:visited{color:#000; text-decoration:none;} #main a:hover{color:#000; text-decoration:none;} #main {line-height:14px;} #main .title a:link{color:#f00; text-decoration:none;} #main .title a:visited{color:#f00; text-decoration:none;} #main .title a:hover{color:#f00; text-decoration:none;} </style> <a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr> <!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。--> <script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script> <script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script> <div style="z-index: 10; height:22px; overflow:hidden;"> <table cellspacing=0 cellpadding=0 width=22> <tbody> <tr> <td> <table cellspacing=0 class="num"> <tbody> <tr> <td width=0 style="display:none;"><img id="upbtn" style="cursor: pointer"></td> </tr> <tr> <td id="led1" class="NUM2" onclick="javascript:slideTo(1);">1</td> <td id="led2" class="NUM1" onclick="javascript:slideTo(2);">2</td> <td id="led3" class="NUM1" onclick="javascript:slideTo(3);">3</td> <td id="led4" class="NUM1" onclick="javascript:slideTo(4);">4</td> </tr> </tbody> </table></td> </tr> </tbody> </table> </div> <div id="main" style="overflow:hidden; width:320px; position:relative; height: 85px;" > <div id="f1" style="z-index: 10; left: 0px; width: 320px; position: absolute; top: 0px; height: 85px;"> <!-- 第1标签 开始 --> <div style="width:308px; padding:5px; height:75px; margin-left:1px; background:url(/img/20240517_www_wuming_ren_28.jpg) no-repeat;cursor:pointer;"> <div style="float:left; width:195px; padding:3px 0 0 3px;"> <div style="color:#f30; font-weight:bold; margin-bottom:8px;" class="title"><a href="https://www.wuming.ren" target="_blank">詹姆斯:全力以赴</a></div> <div><a href="https://www.wuming.ren" target="_blank">竞猜赛事结果,上传LBJ精彩动作,评论比赛表现,都有机会赢取LBJ运动装备大奖...</a></div> </div> </div> <!-- 第1标签 结束 --> </div> <div id="f2" style="z-index: 10; left: 0px; width: 320px; position: absolute; top: 85px; height: 85px"> <!-- 第2标签 开始 --> <div style="width:308px; padding:5px; height:75px; margin-left:1px; background:url(/img/20240517_www_wuming_ren_28.jpg) no-repeat;cursor:pointer;"> <div style="float:left; width:195px; padding:3px 0 0 3px;"> <div style="color:#f30; font-weight:bold; margin-bottom:8px;" class="title"><a href="https://www.wuming.ren" target="_blank">LBJ6详尽测评</a></div> <div><a href="https://www.wuming.ren" target="_blank">在整个LBJ签名系列里,仅次于LBJ2的签名球鞋.他在舒适性上完全可以同LBJ2相媲美.比起2代,只有那么一点点的不足...</a></div> </div> </div> <!-- 第2标签 结束 --> </div> <div id="f3" style="z-index: 10; left: 0px; width: 320px; position: absolute; top: 170px; height: 85px"> <!-- 第3标签 开始 --> <div style="width:308px; padding:5px; height:75px; margin-left:1px; background:url(/img/20240517_www_wuming_ren_28.jpg) no-repeat;cursor:pointer;"> <div style="float:left; width:195px; padding:3px 0 0 3px;"> <div style="color:#f30; font-weight:bold; margin-bottom:8px;" class="title"><a href="https://www.wuming.ren" target="_blank">免费篮球馆</a></div> <div><a href="https://www.wuming.ren" target="_blank">京城一流室内篮球馆免费开放,新浪篮球体验周火热启动...</a></div> </div> </div> <!-- 第3标签 结束 --> </div> <div id="f4" style="z-index: 10; left: 0px; width: 320px; position: absolute; top: 255px; height: 85px;"> <!-- 第4标签 开始 --> <div style="width:308px; padding:5px; height:75px; margin-left:1px; background:url(/img/20240517_www_wuming_ren_28.jpg) no-repeat;cursor:pointer;"> <div style="float:left; width:195px; padding:3px 0 0 3px;"> <div style="color:#f30; font-weight:bold; margin-bottom:8px;" class="title"><a href="https://www.wuming.ren" target="_blank">詹姆斯:有奖征文</a></div> <div><a href="https://www.wuming.ren" target="_blank">NBA名人堂连续8周关注勒布朗詹姆斯跟踪骑士队比赛,竞猜评论赢取运动装备...</a></div> </div> </div> <!-- 第4标签 结束 --> </div> </div> </td> </tr> </tbody> </table> <script language="javascript" type="text/javascript"> //<![CDATA[ var curFrame=1; //当前标签 var frameheight = 85; //单层高度 var speed = 5; //滚动速度 var waitTime = 4000; //自动播放间隔时间 var scrollItv; var autoItv; var maindiv = document.getElementById("main"); autoItv = setInterval(autoSlide, waitTime); function slideTo(id){ curFrame = id; var curTop = maindiv.scrollTop; var tarTop = frameheight*(id-1); var step = curTop>tarTop?-speed:speed; clearInterval(autoItv); clearInterval(scrollItv); scrollItv = setInterval(function(){ maindiv.scrollTop += step; if(Math.abs(maindiv.scrollTop-tarTop)<speed){ clearInterval(scrollItv); maindiv.scrollTop = tarTop; autoItv = setInterval(autoSlide, waitTime); }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) },20); for(i=1;i<=4;i++){ document.getElementById('led'+i).className='NUM1'; } document.getElementById('led'+curFrame).className='NUM2'; } function autoSlide(){ if(curFrame<4){curFrame++;}else{curFrame=1;} slideTo(curFrame); }//武鸣人网站https://www.wuming.ren 网站很好记住,wuming.ren(武鸣拼音.ren域名后缀) //]]> </script>
本文来自武鸣人网站,转载请注明出处