CSS
Desk
ß
Reset
Reset the code to the default
Blueprint
Grid
Desk
White
Black
12 col
16 col
Change the background
Save
Save your changes to this link
Share
Create a permanent link for this code
Download
Download this code as a file
«
HTML
<a href="#" class="hover">Hover me!</a> <br> <a href="#" class="hover">Hover me!<div></div></a>
CSS
body { font-family: 'Lucida Grande', 'Helvetica Neue', Helvetica, Arial, sans-serif; padding: 100px; font-size: 13px; } .hover, .hover > span { background: #fff; position: relative; z-index: 1; } .hover { display: block; margin: 0 auto; width: 200px; padding: 100px; text-align: center; } .hover:before { content: ''; } .hover:before, .hover > div { background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #f0f1f1), color-stop(100%, #444)); background-image: -webkit-linear-gradient(#f0f1f1, #444); background-image: -moz-linear-gradient(#f0f1f1, #444); background-image: -o-linear-gradient(#f0f1f1, #444); background-image: -ms-linear-gradient(#f0f1f1, #444); background-image: linear-gradient(#f0f1f1, #444); position: absolute; top: 0; left: 0; right: 0; bottom: 0; -moz-transition: opacity 0.5s ease-out; -webkit-transition: opacity 0.5s ease-out; -o-transition: opacity 0.5s ease-out; transition: opacity 0.5s ease-out; z-index: -1; opacity: 0; } .hover:hover:before, .hover:focus:before, .hover:hover > div, .hover:focus > div { opacity: 1; }