星空网 > 软件开发 > Java

jquery仿新浪微博信息展播效果

jquery仿新浪微博信息展播效果:
下面分享一个仿新浪微博的信息展播效果,具有缓冲效果,当然外观现在还不够美观,需要开发者执行再去完善。
代码实例如下:

<!DOCTYPE html> <html> <head> <meta charset=" utf-8"> <meta name="author" content="http://www.softwhy.com/" /><title>仿新浪微博信息展播效果-蚂蚁部落</title><style type="text/css">*{ margin:0px; padding:px;}.w_con { width:400px; height:160px; overflow:hidden; border:1px solid #333; margin:0px auto; margin-top:50px;}#w_slid { width:100%; list-style:none;}#w_slid li { width:100%; height:40px;}li.a { background:#ffc000;}li.b { background:#56aaff;}li.c { background:#0fffaa;}li.d { background:#0ffffa;}li.e { background:#ffff56;}</style><script type="text/javascript" src='/images/loading.gif' data-original="http://www.softwhy.com/mytest/jQuery/jquery-1.8.3.js"></script></head><body><div class="w_con" id="w_con"> <ul id="w_slid">  <li class="a"></li>  <li class="b"></li>  <li class="c"></li>  <li class="d"></li>  <li class="e"></li> </ul></div><script type="text/javascript"> function slide(){  var $w_slid=$('#w_con');  console.log($w_slid);  var Timer;  $w_slid.hover(function(){   clearInterval(Timer);  },function(){   Timer = setInterval(function(){    slideFadeIn($w_slid);   },3000);  }).trigger("mouseleave"); }function slideFadeIn(obj){  var $self = obj.find('ul:first');  var $height = $self.find('li:first').height();  console.log($height);  $self.animate({   'marginTop':+$height+'px',  },1200,function(){   $self.css({ marginTop:0}).find("li:first").appendTo($self);   $self.find("li:first").hide();   $self.find("li:first").fadeIn("slow");  }); } $(function(){  slide(); }); </script></body></html>

以上代码实现了我们想要的下效果,大家可以在本站测试,也可以复制黏贴到本地。
特别说明:代码来源于网络,如有侵权请尽快联系本站。

原文地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=8525

更多内容可以参阅:http://www.softwhy.com/jquery/




原标题:jquery仿新浪微博信息展播效果

关键词:jquery

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

快递空运服务:https://www.goluckyvip.com/tag/102681.html
空运运单:https://www.goluckyvip.com/tag/102682.html
空运运货物:https://www.goluckyvip.com/tag/102683.html
空运孟买:https://www.goluckyvip.com/tag/102684.html
河内空运:https://www.goluckyvip.com/tag/102685.html
航空货运空运:https://www.goluckyvip.com/tag/102687.html
独家丨B站广告位可跳转美团APP B站为电商平台引流再升级 :https://www.kjdsnews.com/a/1836410.html
百崖大峡谷生态旅游景区(探秘中国西南自然风光):https://www.vstour.cn/a/363176.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流