最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

jquery實現(xiàn)廣告上下滾動效果

 更新時間:2021年03月04日 17:45:56   作者:木子李ll  
這篇文章主要為大家詳細(xì)介紹了jquery實現(xiàn)廣告上下滾動效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文實例為大家分享了jquery實現(xiàn)廣告上下滾動效果的具體代碼,供大家參考,具體內(nèi)容如下

一、jquery上下滾動預(yù)約記錄

jquery廣告上下滾動效果,直接上代碼

代碼如下(示例):

CSS:

<style>

 /* -------------------------預(yù)約記錄----------------------------------- */
 .Top_Record{}
 .topRec_List dl,.maquee{ width:90%; overflow:hidden; margin:0 auto; color:#7C7C7C}
 .maquee{ height:265px;}
 .topRec_List ul{ width:100%; height:195px;}
 .topRec_List li{ height:35px;font-size:14px;width: 100% }
 /*.topRec_List li:nth-child(2n){ background:#077cd0}*/
 .topRec_List li div{ float:left;}
 .topRec_List li div:nth-child(1){ width:35%;}
 .topRec_List li div:nth-child(2){ width:35%;}
 .topRec_List li div:nth-child(3){ width:20%;}
 .maquee ul li{float: left}
 .active{
 color: #FC6A13;
 }
</style>

HTML:

<div style="background: #ffffff;width: 100%;margin-top: 5pt;padding-bottom: 10pt;padding-top: 5pt">
 <div class="titled"><p class="person">已有235人看房</p><p class="titleds">預(yù)約記錄</p></div>
 <br>
 <div class="Top_Record">
 <div class="topRec_List">
 <dl>
{{-- <dd> </dd>--}}
 </dl>
 <div class="maquee">
 <ul>
 <li><div>張三1</div><div>131****121</div><div>10分鐘前</div></li>
 <li><div>張三2</div><div>131****121</div><div>10分鐘前</div></li>
 <li><div>張三3</div><div>131****121</div><div>10分鐘前</div></li>
 </ul>
 </div>
 </div>
 </div>
</div>

JS:

<script type="text/javascript">

 const index = ($(".maquee").height() / $(".maquee ul li").height());
 function autoScroll(obj){
 $(obj).find("ul").animate({
 marginTop : "-35px"
 },1000,function(){
 $(this).css({marginTop : "0px"}).find("li:first").appendTo(this);
 })
 $(".maquee ul li").removeClass('active');
 $(".maquee ul li").eq(parseInt(index)+1).addClass('active')
 }
 $(function(){
 var scroll=setInterval('autoScroll(".maquee")',1500);
 });


 $(".maquee ul li").eq(parseInt(index)+1).addClass('active')

</script>

二、效果

以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論

信丰县| 彭水| 贺兰县| 肇庆市| 枞阳县| 浦县| 盐边县| 黎平县| 皋兰县| 务川| 吉隆县| 蓬安县| 耒阳市| 怀集县| 齐齐哈尔市| 视频| 巴青县| 临邑县| 象州县| 沾化县| 康保县| 米易县| 淮北市| 白水县| 阳信县| 乌鲁木齐县| 太谷县| 哈密市| 宿迁市| 马关县| 贵港市| 塘沽区| 韶关市| 香港 | 临沭县| 淮阳县| 牙克石市| 阿克| 黎川县| 富平县| 华亭县|