基本信息
源码名称:Twitter“点赞”红心按钮CSS3动画特效
源码大小:0.07M
文件格式:.zip
开发语言:CSS
更新时间:2018-04-25
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
<!doctype html> <html lang="zh"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Twitter“点赞”红心按钮CSS3动画特效|DEMO_jQuery之家-自由分享jQuery、html5、css3的插件库</title> <link rel="stylesheet" type="text/css" href="css/normalize.css" /> <link rel="stylesheet" type="text/css" href="css/default.css"> <link rel="stylesheet" type="text/css" href="css/style.css"/> <!--[if IE]> <script src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script> <![endif]--> </head> <body> <article class="htmleaf-container"> <header class="htmleaf-header"> <h1>Twitter“点赞”红心按钮CSS3动画特效 <span>Twitter Heart Button CSS3 Animation</span></h1> <div class="htmleaf-links"> <a class="htmleaf-icon icon-htmleaf-home-outline" href="http://www.htmleaf.com/" title="jQuery之家" target="_blank"><span> jQuery之家</span></a> <a class="htmleaf-icon icon-htmleaf-arrow-forward-outline" href="http://www.htmleaf.com/css3/css3donghua/201511132778.html" title="返回下载页" target="_blank"><span> 返回下载页</span></a> </div> </header> <div id="container"> <h3>点击下面的红心查看效果!</h3> <div class="feed" id="feed1"> <p>W3C <a href="http://www.w3.org/" target="_blank">http://www.w3.org/</a></p> <div class="heart " id="like1" rel="like"></div> <div class="likeCount" id="likeCount1">14</div> </div> <div class="feed" id="feed2"> <p>百度一下 <a href="https://www.baidu.com/" target="_blank">https://www.baidu.com</a></p> <div class="heart" id="like2" rel="like"></div> <div class="likeCount" id="likeCount2">10</div> </div> <div class="feed" id="feed2"> <p>jQuery之家 <a href="http://www.htmleaf.com/" target="_blank">http://www.htmleaf.com/</a></p> <div class="heart" id="like3" rel="like"></div> <div class="likeCount" id="likeCount3">24</div> </div> </div> <footer class="related"> <h3>如果你喜欢这个插件,那么你可能也喜欢:</h3> <a href="http://www.htmleaf.com/css3/css3donghua/201510282717.html"> <img src="related/1.jpg" width="300" alt="30种炫酷CSS3鼠标滑过按钮动画特效"/> <h3>30种炫酷CSS3鼠标滑过按钮动画特效</h3> </a> <a href="http://www.htmleaf.com/css3/ui-design/201509222606.html"> <img src="related/2.jpg" width="300" alt="纯CSS3炫酷Material Design风格单选按钮和复选框动画特效"/> <h3>纯CSS3炫酷Material Design风格单选按钮和复选框动画特效</h3> </a> </footer> </article> <script src="http://libs.useso.com/js/jquery/1.11.0/jquery.min.js" type="text/javascript"></script> <script>window.jQuery || document.write('<script src="js/jquery-1.11.0.min.js"><\/script>')</script> <script> $(document).ready(function() { $('body').on("click",'.heart',function() { var A=$(this).attr("id"); var B=A.split("like"); var messageID=B[1]; var C=parseInt($("#likeCount" messageID).html()); $(this).css("background-position","") var D=$(this).attr("rel"); if(D === 'like') { $("#likeCount" messageID).html(C 1); $(this).addClass("heartAnimation").attr("rel","unlike"); } else { $("#likeCount" messageID).html(C-1); $(this).removeClass("heartAnimation").attr("rel","like"); $(this).css("background-position","left"); } }); }); </script> </body> </html>