跳至主要內容

按钮hover

白日梦想家yy...大约 32 分钟

按钮hover

重要

HTML
//最好用npm引入
<link rel="stylesheet" type="text/css" href="css/normalize.css" /> 
<link href="css/font-awesome.min.css" rel="stylesheet">

//公共样式
<style type="text/css">  
   body{margin:0;padding:0;}  
   .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>

//HTML正文
<section class="buttons">  
   <h1>Button Hover Effects</h1>  
   <h4>css3 transition effects on hover and css3 transition effects on click</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> Hover </a>   
<!--End of Button 1 -->   
<a href="#" class="set_1_btn Vbtn-2">Hover</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> Hover </a>   
<!--End of Button 3 -->   
        
<a href="#" class="set_1_btn Vbtn-4">Hover</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>Sample Button</span></div>  
      <!--End of Button 1 -->  
      <div class="set_2_button color2 set_2_btn-1 icon-backward"><span>Sample Button</span></div>  
      <!--End of Button 2 -->  
      <div class="set_2_button color3 set_2_btn-2 icon-up"><span>Sample Button</span></div>  
      <!--End of Button 3 -->  
      <div class="set_2_button color4 set_2_btn-2 icon-down"><span>Sample Button</span></div>  
      <!--End of Button 4 -->  
      <div class="set_2_button color5 set_2_btn-2 icon-down"><span>Sample Button</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="Hover" class="set_3_button"><span>Sample Button</span></div>  
      <!--End of Button 1 -->  
      <div data-text="Hover" class="set_3_button2"><span>Sample Button</span></div>  
      <!--End of Button 2 -->  
      <div data-text="Hover" class="set_3_button3"><span>Sample Button</span></div>  
      <!--End of Button 3 -->  
      <div data-text="Hover" class="set_3_button4"><span>Sample Button</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>Sample Button</span> </div>  
      <!--End of Button 1 -->  
      <div class="set_4_button2 raised hoverable">  
        <div class="anim"></div>  
        <span>Sample Button</span> </div>  
      <!--End of Button 2 -->  
      <div class="set_4_button3 raised hoverable">  
        <div class="anim"></div>  
        <span>Sample Button</span> </div>  
      <!--End of Button 3 -->  
      <div class="set_4_button4 raised hoverable">  
        <div class="anim"></div>  
        <span>Sample Button</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">Sample Button</div>  
      <!--End of Button 1 -->  
      <div class="set_5_button2">Sample Button</div>  
      <!--End of Button 2 -->  
      <div class="set_5_button3">Sample Button</div>  
      <!--End of Button 3 -->  
      <div class="set_5_button4">Sample Button</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>Sample Button</span>  
        <div class="corners top"></div>  
        <div class="corners bottom"></div>  
      </div>      <!--End of Button 1 -->  
      <div class="set_6_btn out yellow"> <span>Sample Button</span>  
        <div class="corners top"></div>  
        <div class="corners bottom"></div>  
      </div>      <!--End of Button 2 -->  
      <div class="set_6_btn in red"> <span>Sample Button</span>  
        <div class="corners top"></div>  
        <div class="corners bottom"></div>  
      </div>      <!--End of Button 3 -->  
      <div class="set_6_btn in blue"> <span>Sample Button</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="">Sample Button</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="">Sample Button</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="">Sample Button</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="">Sample Button</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="#">Sample Button<span class="lines"></span></div>  
      <!--End of Button 1 -->  
      <div class="set_8_button2 outline" href="#">Sample Button<span class="lines"></span></div>  
      <!--End of Button 2 -->  
      <div class="set_8_button3 outline" href="#">Sample Button<span class="lines"></span></div>  
      <!--End of Button 3 -->  
      <div class="set_8_button4 outline" href="#">Sample Button<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> Sample Button </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> Sample Button </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> Sample Button </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> Sample Button </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>
上次编辑于:
贡献者: mygit