jQuery實(shí)現(xiàn)的文字逐行向上間歇滾動(dòng)效果示例
本文實(shí)例講述了jQuery實(shí)現(xiàn)的文字逐行向上間歇滾動(dòng)效果。分享給大家供大家參考,具體如下:
運(yùn)行效果圖如下:

具體代碼如下:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>m.fzitv.net jQuery文字逐行向上滾動(dòng)代碼</title>
<link href="css/index.css" rel="external nofollow" rel="stylesheet" type="text/css">
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<style>
*{ margin:0px; padding:0px; font-family:'微軟雅黑'; -webkit-tap-highlight-color:rgba(0,0,0,0); }
li{ list-style:none }
img{ border:none}
a{text-decoration:none;}
/* -------------------------搖獎(jiǎng)排行榜----------------------------------- */
.Top_Record{}
.record_Top{width:90%; height:50px; text-align:center; line-height:50px; margin:30px auto 0px; color:#000;}
.topRec_List dl,.maquee{ width:90%; overflow:hidden; margin:0 auto; color:#7C7C7C}
.topRec_List dd{ float:left; text-align:center; border-bottom:1px solid #1B96EE; color:#1B96EE;}
.topRec_List dl dd:nth-child(1){ width:17%; height:40px; line-height:40px; }
.topRec_List dl dd:nth-child(2){ width:18%; height:40px; line-height:40px; }
.topRec_List dl dd:nth-child(3){ width:25%; height:40px; line-height:40px; }
.topRec_List dl dd:nth-child(4){ width:40%; height:40px; line-height:40px; }
.maquee{ height:195px;}
.topRec_List ul{ width:100%; height:195px;}
.topRec_List li{ width:100%; height:38px; line-height:38px; text-align:center; font-size:12px; border-bottom: 1px dashed #aaa;}
/*.topRec_List li:nth-child(2n){ background:#077cd0}*/
.topRec_List li div{ float:left;}
.topRec_List li div:nth-child(1){ width:17%;}
.topRec_List li div:nth-child(2){ width:18%;}
.topRec_List li div:nth-child(3){ width:25%;}
.topRec_List li div:nth-child(4){ width:40%;}
.apple a{display:block; text-decoration:none;}
.apple,.aa{ width:90%; height:50px; overflow:hidden; margin:30px auto; border:1px solid #1B96EE;}
.apple a,.aa a{ width:100%; height:50px; line-height:50px; text-indent:20px; color:#1B96EE;}
.aa {word-wrap:break-word;line-height:50px; color:#1B96EE;}
</style>
</head>
<body>
<div class="Top_Record">
<div class="record_Top">搖獎(jiǎng)排行榜</div>
<div class="topRec_List">
<dl>
<dd>編號(hào)</dd>
<dd>姓名</dd>
<dd>獎(jiǎng)項(xiàng)</dd>
<dd>時(shí)間</dd>
</dl>
<div class="maquee">
<ul>
<li>
<div>1</div>
<div>王**</div>
<div>中了30元</div>
<div>2014/12/30 14:20</div>
</li>
<li>
<div>2</div>
<div>王**</div>
<div>中了30元</div>
<div>2014/12/30 14:20</div>
</li>
<li>
<div>3</div>
<div>王**</div>
<div>中了30元</div>
<div>2014/12/30 14:20</div>
</li>
<li>
<div>4</div>
<div>王**</div>
<div>中了30元</div>
<div>2014/12/30 14:20</div>
</li>
<li>
<div>5</div>
<div>王**</div>
<div>中了30元</div>
<div>2014/12/30 14:20</div>
</li>
<li>
<div>6</div>
<div>王**</div>
<div>中了30元</div>
<div>2014/12/30 14:20</div>
</li>
<li>
<div>7</div>
<div>王**</div>
<div>中了30元</div>
<div>2014/12/30 14:20</div>
</li>
<li>
<div>8</div>
<div>王**</div>
<div>中了30元</div>
<div>2014/12/30 14:20</div>
</li>
</ul>
</div>
</div>
</div>
<script type="text/javascript">
function autoScroll(obj){
$(obj).find("ul").animate({
marginTop : "-39px"
},1000,function(){
$(this).css({marginTop : "0px"}).find("li:first").appendTo(this);
})
}
$(function(){
var scroll=setInterval('autoScroll(".maquee")',1500);
$(".maquee").hover(function(){
console.log("aaa");
clearInterval(scroll);
},function(){
scroll=setInterval('autoScroll(".maquee")',1500);
});
});
</script>
</body>
</html>
更多關(guān)于jQuery相關(guān)內(nèi)容感興趣的讀者可查看本站專題:《jQuery切換特效與技巧總結(jié)》、《jQuery拖拽特效與技巧總結(jié)》、《jQuery擴(kuò)展技巧總結(jié)》、《jQuery常見(jiàn)經(jīng)典特效匯總》、《jQuery動(dòng)畫(huà)與特效用法總結(jié)》、《jquery選擇器用法總結(jié)》及《jQuery常用插件及用法總結(jié)》
希望本文所述對(duì)大家jQuery程序設(shè)計(jì)有所幫助。
- 利用10行js代碼實(shí)現(xiàn)上下滾動(dòng)公告效果
- js向上無(wú)縫滾動(dòng),網(wǎng)站公告效果 具體代碼
- 原生js實(shí)現(xiàn)公告滾動(dòng)效果
- jQuery實(shí)現(xiàn)公告文字左右滾動(dòng)的實(shí)例代碼
- 基于jQuery的公告無(wú)限循環(huán)滾動(dòng)實(shí)現(xiàn)代碼
- Jquery公告滾動(dòng)+AJAX后臺(tái)得到數(shù)據(jù)
- jquery垂直公告滾動(dòng)實(shí)現(xiàn)代碼
- jQuery實(shí)現(xiàn)上下滾動(dòng)公告欄詳細(xì)代碼
- jQuery實(shí)現(xiàn)單行文字間歇向上滾動(dòng)源代碼
- jquery插件之文字間歇自動(dòng)向上滾動(dòng)效果代碼
- JavaScript實(shí)現(xiàn)的滾動(dòng)公告特效【基于jQuery】
相關(guān)文章
鼠標(biāo)拖動(dòng)實(shí)現(xiàn)DIV排序示例代碼
鼠標(biāo)拖動(dòng)實(shí)現(xiàn)DIV排序的教程有很多,在本文將為大家詳細(xì)介紹個(gè)不錯(cuò)的示例,對(duì)比傳統(tǒng)的排序,這是一個(gè)很不錯(cuò)的嘗試2013-10-10
jQuery對(duì)象和Javascript對(duì)象之間轉(zhuǎn)換的實(shí)例代碼
jQuery對(duì)象和Javascript對(duì)象之間轉(zhuǎn)換的實(shí)例代碼,需要的朋友可以參考一下2013-03-03
jquery焦點(diǎn)圖片切換(數(shù)字標(biāo)注/手動(dòng)/自動(dòng)播放/橫向滾動(dòng))
焦點(diǎn)圖片切換在網(wǎng)頁(yè)制作的商品展示中經(jīng)常會(huì)用到,這樣的效果可以給用戶帶來(lái)耳目一新的感覺(jué)同時(shí)也是用戶比較追捧的,本文也實(shí)現(xiàn)了一個(gè)這樣的焦點(diǎn)圖片切換效果,感興趣的你可以參考下啊,希望本文對(duì)你有所幫助2013-01-01
jquery右下角自動(dòng)彈出可關(guān)閉的廣告層
jQuery實(shí)現(xiàn)右下角自動(dòng)彈出可關(guān)閉的懸浮提示層特效。這種效果可以使用jQuery彈出層實(shí)現(xiàn)。有需要的小伙伴可以參考下。2015-05-05
jquery上傳插件fineuploader上傳文件使用方法(jquery圖片上傳插件)
這篇文章主要介紹了jquery插件fineuploader上傳文件很用方法2013-12-12

