CSS3 Hover Shine Effect
by Kesavamoorthi Subramanian
HTML
<a href="#" class="button">
<span class="shine"></span>
<span class="text">Hover Me</span>
</a>
CSS
body{
background: #888;
}
a.button {
width: 200px;
height: 50px;
background: #333;
display: block;
position: relative;
margin: 50px auto 0;
overflow: hidden;
border: 1px solid #333333;
color: white;
text-decoration: none;
-webkit-box-shadow: inset 0px 1px 1px 0px rgba(255,255,255,.4);
-moz-box-shadow: inset 0px 1px 1px 0px rgba(255,255,255,.4);
box-shadow: inset 0px 1px 1px 0px rgba(255,255,255,.4);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease;
-ms-transition: all 0.2s ease;
-o-transition: all 0.2s ease;
transition: all 0.2s ease;
background-image: -webkit-linear-gradient(bottom, #383838 0%, #444444 49%, #555 50%, #555 100%);
background-image: -moz-linear-gradient(bottom, #383838 0%, #444444 49%, #555 50%, #555 100%);
background-image: -ms-linear-gradient(bottom, #383838 0%, #444444 49%, #555 50%, #555 100%);
background-image: -o-linear-gradient(bottom, #383838 0%, #444444 49%, #555 50%, #555 100%);
background-image: linear-gradient(bottom, #383838 0%, #444444 49%, #555 50%, #555 100%);
}
a.button span.text {
position: absolute;
top: 16px;
left: 65px;
font: 15px Arial;
}
a.button span.shine {
content: '';
position: absolute;
height: 400px;
width: 20px;
background: white;
top: -80px;
left: -20px;
display: block;
opacity: 0.8;
-webkit-box-shadow: 0px 0px 20px 10px white;
-moz-box-shadow: 0px 0px 20px 10px white;
box-shadow: 0px 0px 20px 10px white;
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
-webkit-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
-ms-transition: all 0.4s ease;
-o-transition: all 0.4s ease;
transition: all 0.4s ease;
}
a.button:hover {
-webkit-box-shadow: inset 0px 1px 10px 0px rgba(255,255,255,.4), 0px 3px 3px 0px rgba(0,0,0,0.4);
-moz-box-shadow: inset 0px...