CSS3实现漂亮的按钮动画

时间:2016.04.21 发布人:ice_xxxx

CSS3实现漂亮的按钮动画

已解决问题

谷歌ice_xxxx用户在2016.04.21提交了关于“夏至未至CSS3实现漂亮的按钮动画”的提问,欢迎大家涌跃发表自己的观点。目前共有1个回答,最后更新于2025-03-02T03:05:32。希望大家能够帮助她。

详细问题描述及疑问:期待您的答案,当代劳模,所有人都应该向你学习 !

希望以下的回答,能够帮助你。

第1个回答

用户名:loso顺沉养际应说ngj  

Chrome下效果理想,Firefox,IE9下没有动画效果。

CSS代码片段.button,.button:visited{b来自ackground:#222url(overlay.png)repeat-x;叫display:inline-block;padding:**x10px6px;color:#fff;text-decoration:none;/*border-radius*/-webkit-border-radius:6px;-moz-border-radius:6px;bo晶相古良成已rder-radius:6px;/*box-shadow*/-web富流会粉直整kit-box-shadow:01px**xrgba(0,0,0,0.6);-moz-box-shadow:01px**xrgba(0,0,员促让今玉志0,0.6);box-shadow:01px**xrgba(0,0,0,0.6);text-shadow:0-1px1pxrg冷封ba(0,0,0,0.25);border-bottom:1pxsolidrgba(0,0,0,0.25);position:rela输率妒英值往见行tive;curso问答r:pointer;}.but孔雷游架在到的叶亲印ton:hover{ba担律益均板供ckground-color:#11沙1;color:#fff;/*animation-**ration*/-webkit-animation-**ration:右物美物兰文父真谁距2s;-moz-animation-**ration:2s;-ms-a跟剂又特报nimation-**ration:2s;-o-animation-**ration:2s;animation-**ration:2s;/*animation-timing-function*/-webkit-animation-timing-function:ease-out;-moz-animation-timing-function:ease-out;-ms-animation-timing-function钢子商还流促火:ease-out;-o-a担集员类拿叫终火鲁nimation-timing-function:ease-out;animation-timing-function:ease-out;/*animation-itera河县普tion-count*/-webkit-animation-iteration-coun子轴鸡造贵服征然财时突t:infinite;-moz-animation-iteration-count:infinite;-ms-animation-iterati输盟究院on-count:infinite;-o-animation-iteration-count:infinite;没官animation-iteration-count:infinite;}/*定义动画*/@-webkit-keyframesgreenPulse{from{background-color:#91bd09;/*box-shadow*/-webkit-box-shadow:009px#333;-moz-box-shadow:009px#333;box-shadow:009px#333;}50%{background-color:#B4E02C;/*box-shadow*/-webkit-box-shadow:0018px#91bd09;-moz-box-shadow:0018px#91bd09;box-shadow:0018px#91bd09;}to{background-color:#91bd09;/*box-shadow*/-webkit-box-shadow:009px#333;-moz-box-shadow:009px#333;box-shadow:009px#333;}}.green.button,.green.button:visited{background-color:#91bd09;}.green.button:hover{/*animation-name*/-webkit-animation-name:greenPulse;-moz-animation-name:greenPulse;-ms-animation-name:greenPulse;-o-animation-name:greenPulse;animation-name:greenPulse;}h**TML代码片段<ul><li><aclass="buttonmagentasuper"href="#">按钮</a><aclass="buttongreensuper"href="#">按钮</a><aclass="buttonredsuper"href="#">按钮</a><aclass="buttonorangesuper"href="#">按钮</a><aclass="buttonbluesuper"href="#">按钮</a><aclass="buttonyellowsuper"href="#">按钮</a></li><li><inputtype="button"class="buttonmagentasuper"value="按钮"/><inputtype="button"class="buttongreensuper"value="按钮"/><inputtype="button"class="buttonredsuper"value="按钮"/><inputtype="button"class="buttonorangesuper"value="按钮"/>

inputtype="button"class="buttonbluesuper"value="按钮"/inputtype="button"class="buttonyellowsuper"value="按钮"//li/ul


<inputtype="button"class="buttonbluesuper"value="按钮"/>
<inputtype="button"class="buttonyellowsuper"value="按钮"/>
</li>