CSS3 code implementation of the mouse hover button effect code example:
Before CSS3, the mouse hover over the button, nothing but the size of the button, font color or background pictures and other simple items, but the appearance of CSS3, can let the settings become colorful, the following is a CSS3 implementation of this effect.
The code is as follows:
<!DOCTYPE HTML><HTML><Head><MetaCharSet= "Utf-8"><Metaname= "Author"content= "http://www.softwhy.com/" /><title>Ant Tribe</title><styletype= "Text/css">*, *: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; } </style></Head><Body><aclass= "Btn-edge"href= "Http://www.softwhy.com">Ant Tribe</a> </Div></Body></HTML>
The original address is: http://www.softwhy.com/forum.php?mod=viewthread&tid=15539
For more information, refer to: http://www.softwhy.com/divcss/
CSS3 code example of mouse hover button effect code implementation