一款15种纯CSS3多种悬停按钮动画特效,有不同的动画特效和样式可供选择,当然啦,颜色、字体、动画效果都是可以自由调整的,修改时请分别对应不同的样式文件修改,喜欢的童鞋请收下吧。
页面的head部分,先引入多个CSS样式文件,接着设置好页面其他元素的样式,代码如下:
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/htmleaf-demo.css">
<link href="http://cdn.bootcss.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/set_1.css">
<link rel="stylesheet" href="css/set_2.css">
<link rel="stylesheet" href="css/set_3.css">
<link rel="stylesheet" href="css/set_4.css">
<link rel="stylesheet" href="css/set_5.css">
<link rel="stylesheet" href="css/set_6.css">
<link rel="stylesheet" href="css/set_7.css">
<link rel="stylesheet" href="css/set_8.css">
<link rel="stylesheet" href="css/set_9.css">
<link rel="stylesheet" href="css/set_10.css">
<link rel="stylesheet" href="css/set_11.css">
<link rel="stylesheet" href="css/set_12.css">
<link rel="stylesheet" href="css/set_13.css">
<link rel="stylesheet" href="css/set_14.css">
<link rel="stylesheet" href="css/set_15.css">
<style type="text/css">
body{margin:0;padding:0;font-family: 'Microsoft YaHei','Lantinghei SC','Open Sans',Arial,'Hiragino Sans GB','STHeiti','WenQuanYi Micro Hei','SimSun',sans-serif;}
.post-header{max-width:100%;padding:15px 0;background:#fff;border-bottom:4px solid #38A8EB;clear:both;}
.post-header .inner-header{max-width:1024px;margin:0 auto;}
.post-header .inner-header a{outline:none;border:none;text-decoration:none;}
.post-header .inner-header img{max-width:150px;}
.post-footer{max-width:100%;padding:15px 0;background:#333;border-top:4px solid #38A8EB;color:#EEE;font-size:14px;text-align:center;clear:both;}
.post-footer a{color:#38A8EB;text-decoration:none;border:none;outline:none;}
</style>
页面的body部分,只需要将15种效果统一放入section里面即可,代码如下:
<section class="buttons">
<h1>纯CSS3按钮</h1>
<h4>15种鼠标悬停动画特效</h4>
<!--Set 1 start-->
<div class="container_odd">
<div class="set_container"> <a href="#" class="set_1_btn Vbtn-1"> <svg>
<rect x="0" y="0" fill="none" width="100%" height="100%"></rect>
</svg>示例按钮</a>
<!--End of Button 1 -->
<a href="#" class="set_1_btn Vbtn-2">示例按钮</a>
<!--End of Button 2 -->
<a href="#" class="set_1_btn Vbtn-3"> <svg>
<rect x="0" y="0" fill="none" width="100%" height="100%"></rect>
</svg>示例按钮</a>
<!--End of Button 3 -->
<a href="#" class="set_1_btn Vbtn-4">示例按钮</a>
<!--End of Button 4 -->
<div style="clear:both"></div>
</div>
</div>
<!--Set 1 end-->
<!--Set 2 start-->
<div class="container_even">
<div class="set_container">
<div class="set_2_button color1 set_2_btn-1 icon-forward"><span>示例按钮</span></div>
<!--End of Button 1 -->
<div class="set_2_button color2 set_2_btn-1 icon-backward"><span>示例按钮</span></div>
<!--End of Button 2 -->
<div class="set_2_button color3 set_2_btn-2 icon-up"><span>示例按钮</span></div>
<!--End of Button 3 -->
<div class="set_2_button color4 set_2_btn-2 icon-down"><span>示例按钮</span></div>
<!--End of Button 4 -->
<div class="set_2_button color5 set_2_btn-2 icon-down"><span>示例按钮</span></div>
<!--End of Button 5 -->
<div style="clear:both"></div>
</div>
</div>
<!--Set 2 end-->
<!--Set 3 start-->
<div class="container_odd">
<div class="set_container">
<div data-text="鼠标悬停" class="set_3_button"><span>示例按钮</span></div>
<!--End of Button 1 -->
<div data-text="鼠标悬停" class="set_3_button2"><span>示例按钮</span></div>
<!--End of Button 2 -->
<div data-text="鼠标悬停" class="set_3_button3"><span>示例按钮</span></div>
<!--End of Button 3 -->
<div data-text="鼠标悬停" class="set_3_button4"><span>示例按钮</span></div>
<!--End of Button 4 -->
<div style="clear:both"></div>
</div>
</div>
<!--Set 3 end-->
<!--Set 4 start-->
<div class="container_even">
<div class="set_container">
<div class="set_4_button1 raised hoverable">
<div class="anim"></div>
<span>示例按钮</span> </div>
<!--End of Button 1 -->
<div class="set_4_button2 raised hoverable">
<div class="anim"></div>
<span>示例按钮</span> </div>
<!--End of Button 2 -->
<div class="set_4_button3 raised hoverable">
<div class="anim"></div>
<span>示例按钮</span> </div>
<!--End of Button 3 -->
<div class="set_4_button4 raised hoverable">
<div class="anim"></div>
<span>示例按钮</span> </div>
<!--End of Button 4 -->
<div style="clear:both"></div>
</div>
</div>
<!--Set 4 end-->
<!--Set 5 start-->
<div class="container_odd">
<div class="set_container">
<div class="set_5_button">示例按钮</div>
<!--End of Button 1 -->
<div class="set_5_button2">示例按钮</div>
<!--End of Button 2 -->
<div class="set_5_button3">示例按钮</div>
<!--End of Button 3 -->
<div class="set_5_button4">示例按钮</div>
<!--End of Button 4 -->
<div style="clear:both"></div>
</div>
</div>
<!--Set 5 end-->
<!--Set 6 start-->
<div class="container_even">
<div class="set_container">
<div class="set_6_btn out grey"> <span>示例按钮</span>
<div class="corners top"></div>
<div class="corners bottom"></div>
</div>
<!--End of Button 1 -->
<div class="set_6_btn out yellow"> <span>示例按钮</span>
<div class="corners top"></div>
<div class="corners bottom"></div>
</div>
<!--End of Button 2 -->
<div class="set_6_btn in red"> <span>示例按钮</span>
<div class="corners top"></div>
<div class="corners bottom"></div>
</div>
<!--End of Button 3 -->
<div class="set_6_btn in blue"> <span>示例按钮</span>
<div class="corners top"></div>
<div class="corners bottom"></div>
</div>
<!--End of Button 4 -->
<div style="clear:both"></div>
</div>
</div>
<!--Set 6 end-->
<!--Set 7 start-->
<div class="container_odd">
<div class="set_container">
<div class="set_7_btn-wrapper"> <svg height="45" width="150" xmlns="#">
<rect id="set_7_button1" height="45" width="150"></rect>
</svg>
<div id="set_7_text"> <a href="">示例按钮</a> </div>
</div>
<!--End of Button 1 -->
<div class="set_7_btn-wrapper"> <svg height="45" width="150" xmlns="#">
<rect id="set_7_button2" height="45" width="150"></rect>
</svg>
<div id="set_7_text"> <a href="">示例按钮</a> </div>
</div>
<!--End of Button 2 -->
<div class="set_7_btn-wrapper"> <svg height="45" width="150" xmlns="#">
<rect id="set_7_button3" height="45" width="150"></rect>
</svg>
<div id="set_7_text"> <a href="">示例按钮</a> </div>
</div>
<!--End of Button 3 -->
<div class="set_7_btn-wrapper"> <svg height="45" width="150" xmlns="#">
<rect id="set_7_button4" height="45" width="150"></rect>
</svg>
<div id="set_7_text"> <a href="">示例按钮</a> </div>
</div>
<!--End of Button 4 -->
<div style="clear:both"></div>
</div>
</div>
<!--Set 7 end-->
<!--Set 8 start-->
<div class="container_even">
<div class="set_container">
<div class="set_8_button outline" href="#">示例按钮<span class="lines"></span></div>
<!--End of Button 1 -->
<div class="set_8_button2 outline" href="#">示例按钮<span class="lines"></span></div>
<!--End of Button 2 -->
<div class="set_8_button3 outline" href="#">示例按钮<span class="lines"></span></div>
<!--End of Button 3 -->
<div class="set_8_button4 outline" href="#">示例按钮<span class="lines"></span></div>
<!--End of Button 4 -->
<div style="clear:both"></div>
</div>
</div>
<!--Set 8 end-->
<!--Set 9 start-->
<div class="container_odd">
<div class="set_container">
<!--<h3>Set 9</h3>-->
<div class="set_9_btn-corner"> <span class="line1"></span> <span class="line2"></span> <span class="line3"></span> <span class="line4"></span> 示例按钮 </div>
<!--End of Button 1 -->
<div class="set_9_btn2-corner"> <span class="line1"></span> <span class="line2"></span> <span class="line3"></span> <span class="line4"></span> 示例按钮 </div>
<!--End of Button 2 -->
<div class="set_9_btn3-corner"> <span class="line1"></span> <span class="line2"></span> <span class="line3"></span> <span class="line4"></span> 示例按钮 </div>
<!--End of Button 3 -->
<div class="set_9_btn4-corner"> <span class="line1"></span> <span class="line2"></span> <span class="line3"></span> <span class="line4"></span> 示例按钮 </div>
<!--End of Button 4 -->
<div style="clear:both"></div>
</div>
</div>
<!--Set 9 end-->
<!--Set 10 start-->
<div class="container_even">
<div class="set_container">
<div class="set_10_button btn1">
<div class="icon">★</div>
<span>Hover over me</span> </div>
<!--End of Button 1 -->
<div class="set_10_button2 btn2">
<div class="icon">★</div>
<span>Hover over me</span> </div>
<!--End of Button 2 -->
<div class="set_10_button3 btn3">
<div class="icon">★</div>
<span>Hover over me</span> </div>
<!--End of Button 3 -->
<div class="set_10_button4 btn4">
<div class="icon">★</div>
<span>Hover over me</span> </div>
<!--End of Button 4 -->
<div style="clear:both"></div>
</div>
</div>
<!--Set 10 end-->
<!--Set 11 start-->
<div class="container_odd">
<div class="set_container">
<div class="set_11_buttons animated"> <a href="#" class="facebook"><i class="fa fa-facebook"></i></a>
<!--End of Button 1 -->
<a href="#" class="twitter"><i class="fa fa-twitter"></i></a>
<!--End of Button 2 -->
<a href="#" class="google-plus"><i class="fa fa-google-plus"></i></a>
<!--End of Button 3 -->
<a href="#" class="github"><i class="fa fa-github"></i></a>
<!--End of Button 4 -->
<a href="#" class="email"><i class="fa fa-envelope"></i></a>
<!--End of Button 5 -->
</div>
<div style="clear:both"></div>
</div>
</div>
<!--Set 11 end-->
<!--Set 12 start-->
<div class="container_even">
<div class="set_container">
<div class="set_12_icon-button twitter"><i class="fa fa-twitter"></i><span></span></div>
<!--End of Button 1 -->
<div class="set_12_icon-button facebook"><i class="fa fa-facebook"></i><span></span></div>
<!--End of Button 2 -->
<div href="#" class="set_12_icon-button google-plus"><i class="fa fa-google-plus"></i><span></span></div>
<!--End of Button 3 -->
<div href="#" class="set_12_icon-button linkedin"><i class="fa fa-linkedin"></i><span></span></div>
<!--End of Button 4 -->
<div href="#" class="set_12_icon-button pinterest"><i class="fa fa-pinterest-p"></i><span></span></div>
<!--End of Button 5 -->
<div style="clear:both"></div>
</div>
</div>
<!--Set 12 end-->
<!--Set 13 start-->
<div class="container_odd">
<div class="set_container">
<div class="viavi_share">
<div class="Vbtn Vfacebook Vslide_x">
<div class="Vicon"><i class="fa fa-facebook"></i></div>
<div class="Vslide"> <span> facebook </span> </div>
<div class="viavi_bg_button">
<div> facebook </div>
</div>
</div>
<!--End of Button 1 -->
<div class="Vbtn Vtwitter Vslide_y">
<div class="Vicon"><i class="fa fa-twitter"></i></div>
<div class="Vslide"> <span> twitter </span> </div>
<div class="viavi_bg_button">
<div>twitter </div>
</div>
</div>
<!--End of Button 2 -->
<div class="Vbtn Vyoutube Vslide_nx">
<div class="Vicon"><i class="fa fa-youtube"></i></div>
<div class="Vslide"> <span> youtube </span> </div>
<div class="viavi_bg_button">
<div>youtube</div>
</div>
</div>
<!--End of Button 3 -->
<div class="Vbtn Vgplus Vslide_ny">
<div class="Vicon"><i class="fa fa-google-plus"></i></div>
<div class="Vslide"> <span> google </span> </div>
<div class="viavi_bg_button">
<div>google</div>
</div>
</div>
<!--End of Button 4 -->
<div class="Vbtn Vlinkedin Vslide_y">
<div class="Vicon"><i class="fa fa-linkedin"></i></div>
<div class="Vslide"> <span> linkedin </span> </div>
<div class="viavi_bg_button">
<div>linkedin</div>
</div>
</div>
<!--End of Button 5 -->
<div class="Vbtn Vtumblr Vslide_nx">
<div class="Vicon"><i class="fa fa-tumblr"></i></div>
<div class="Vslide"> <span> tumblr </span> </div>
<div class="viavi_bg_button">
<div>tumblr</div>
</div>
</div>
<!--End of Button 6 -->
<div class="Vbtn Vgithub Vslide_ny">
<div class="Vicon"><i class="fa fa-github"></i></div>
<div class="Vslide"> <span> github </span> </div>
<div class="viavi_bg_button">
<div>github</div>
</div>
</div>
<!--End of Button 7 -->
<div class="Vbtn Vpinterest Vslide_x">
<div class="Vicon"><i class="fa fa-pinterest-p"></i></div>
<div class="Vslide"> <span> pinterest </span> </div>
<div class="viavi_bg_button">
<div>pinterest</div>
</div>
</div>
<!--End of Button 8 -->
</div>
<div style="clear:both"></div>
</div>
</div>
<!--Set 13 end-->
<!--Set 14 start-->
<div class="container_even">
<div class="set_container">
<div class="set_14_viavi-buttons">
<div class="Vfb" data-share="5"> <i class="fa fa-facebook"></i> </div>
<!--End of Button 1 -->
<div class="Vtw" data-share="10"> <i class="fa fa-twitter"></i> </div>
<!--End of Button 2 -->
<div class="Vin" data-share="3"> <i class="fa fa-linkedin"></i> </div>
<!--End of Button 3 -->
<div class="Vdb" data-share="22"> <i class="fa fa-dribbble"></i> </div>
<!--End of Button 4 -->
</div>
<div style="clear:both"></div>
</div>
</div>
<!--Set 14 end-->
<!--Set 15 start-->
<div class="container_odd">
<div class="set_container">
<div class="set_15_social-buttons">
<div class="set_15_social-button Vfacebook"><i class="fa fa-facebook"></i></div>
<!--End of Button 1 -->
<div href="#" class="set_15_social-button Vtwitter"><i class="fa fa-twitter"></i></div>
<!--End of Button 2 -->
<div class="set_15_social-button Vgoogle"><i class="fa fa-google"></i></div>
<!--End of Button 3 -->
<div class="set_15_social-button Vdribbble"><i class="fa fa-dribbble"></i></div>
<!--End of Button 4 -->
<div class="set_15_social-button Vskype"><i class="fa fa-skype"></i></div>
<!--End of Button 5 -->
</div>
<div style="clear:both"></div>
</div>
</div>
<!--Set 15 end-->
</section>
系统已开启自动识别垃圾评论机制,识别到的自动封号,下载出错或者资源有问题请联系全栈客服QQ 1915635791