星空网 > 软件开发 > Java

基于jQuery仿搜狐辩论投票动画代码

基于jQuery仿搜狐辩论投票动画代码。这是一款个性的卡通小人正方反方辩论投票特效代码。效果图如下:

基于jQuery仿搜狐辩论投票动画代码

在线预览    源码下载

实现的代码。

html代码:

<script type="text/javascript">   $(document).ready(function () {     var a = 500;     var b = 130;     $("#white").animate({ width: 0, left: "250px" }, 1000, function () {       $("#vs").fadeIn("slow", function () {         $("#all").html(a + b); $("#aa").html(a); $("#bb").html(b);         var newLeft = a / (a + b) * 500 - 20 + "px"; //20为vs 的一半         $("#vs").animate({ left: newLeft }, 1000);         $("#red").animate({ width: newLeft }, 1000);       });     });   }); </script>  <div id="box_bg">   <div id="container">     <div id="green" class="line"></div>     <div id="red" class="line"></div>     <div id="white" class="line"></div>     <div id="vs"></div>   </div> </div>  <div style="width:440px; margin:0px auto;">   <div id="aa2" class="scope">正方<span id="aa"></span>票</div>   <div id="bb2" class="scope">**<span id="bb"></span>票</div>   <div id="all2" class="scope">总共<span id="all"></span>票</div> </div>

via:http://www.w2bc.com/article/2015-12-27-jquery-vote



原标题:基于jQuery仿搜狐辩论投票动画代码

关键词:jquery

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

Shoppers Drug Mart:https://www.goluckyvip.com/tag/25313.html
shopperskartuae:https://www.goluckyvip.com/tag/25314.html
Shopping Actions:https://www.goluckyvip.com/tag/25316.html
Shopping Ads:https://www.goluckyvip.com/tag/25317.html
Shopping Feed:https://www.goluckyvip.com/tag/25318.html
EORI编号:https://www.goluckyvip.com/tag/2532.html
大连有啥好玩的景点-大连有啥好玩的景点推荐孩子:https://www.vstour.cn/a/411235.html
咸阳机场到临潼景点 西安咸阳机场到临潼有多远:https://www.vstour.cn/a/411236.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流