CSS3 implementation of mouse through button effects

Source: Internet
Author: User

Today for each netizen to bring a CSS implementation of the mouse through the button effect. When the button is initially, the border is a broken button, and the animation changes to a closed border when the mouse passes over the button. As follows:

Online preview Source Download

Let's take a look at the implementation code:

HTML code:

< Body >    <  target= "_blank"  class= "Btn-edge"  href= "http// Www.w2bc.com/shili ">Hover Me</a></ Body >

CSS code:

*, *:before, *:after{margin:0;padding:0;-webkit-box-sizing:Border-box;-moz-box-sizing:Border-box;box-sizing:Border-box; }Body{Padding-top:10%;text-align:Center;Overflow-x:Hidden; }. Btn-edge{position:relative;Display:Inline-block;padding:1rem 2rem;font-family:' Titillium Web ', Sans-serif;Font-weight: the;text-decoration:None;font-size:3rem;Color:#333;Background-image:-webkit-gradient (linear, left top, left bottom, from (#333), to (#333)),-webkit-gradient (linear, left top, left bottom , from (#333), to (#333)),-webkit-gradient (linear, left top, left bottom, from (#333), to (#333)),-webkit-gradient (linear, Left top, left bottom, from (#333), to (#333)),-webkit-gradient (linear, left top, left bottom, from (#333), to (#333)),-WEBK It-gradient (linear, left top, left bottom, from (#333), to (#333)),-webkit-gradient (linear, left top, left bottom, from (#33 3), to (#333)),-webkit-gradient (linear, left top, left bottom, from (#333), to (#333));Background-image:-webkit-linear-gradient (#333, #333),-webkit-linear-gradient (#333, #333),-webkit-linear-gradient (#333, #333),- Webkit-linear-gradient (#333, #333),-webkit-linear-gradient (#333, #333),-webkit-linear-gradient (#333, #333),- Webkit-linear-gradient (#333, #333),-webkit-linear-gradient (#333, #333);Background-image:linear-gradient (#333, #333), Linear-gradient (#333, #333), Linear-gradient (#333, #333), Linear-gradient (#333, #333 ), Linear-gradient (#333, #333), Linear-gradient (#333, #333), Linear-gradient (#333, #333), Linear-gradient (#333, #333) ;background-repeat:no-repeat;-webkit-background-size:2rem 5px, 2rem 5px, 2rem 5px, 2rem 5px, 5px 2rem, 5px 2rem, 5px 2rem, 5px 2rem;background-size:2rem 5px, 2rem 5px, 2rem 5px, 2rem 5px, 5px 2rem, 5px 2rem, 5px 2rem, 5px 2rem;background-position:0 0, 100% 0, 0 100%, 100% 100%;-webkit-box-shadow:inset 0 0 0 5px rgba (255, ©, 0);Box-shadow:inset 0 0 0 5px rgba (255, ©, 0);-webkit-transition:background-size 1s. 4s,-webkit-box-shadow. 4s, color. 4s;transition:background-size 1s. 4s, box-shadow. 4s, color. 4s;-webkit-transform:Translatez (0);Transform:Translatez (0); }. Btn-edge:hover{Color:Tomato;-webkit-background-size:100% 5px, 100% 5px, 100% 5px, 100% 5px, 5px 100%, 5px 100%, 5px 100%, 5px 100%;background-size:100% 5px, 100% 5px, 100% 5px, 100% 5px, 5px 100%, 5px 100%, 5px 100%, 5px 100%;-webkit-box-shadow:inset 0 0 0 5px Tomato;Box-shadow:inset 0 0 0 5px Tomato;-webkit-transition:background-size 1s,-webkit-box-shadow. 4s. 6s, color. 4s. 6s;transition:background-size 1s, box-shadow. 4s. 6s, color. 4s. 6s; }

Note: This article Love programming original article, reproduced please specify the original address: http://www.w2bc.com/Article/6366

CSS3 implementation of mouse through button effects

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.