Created
June 14, 2011 19:57
-
-
Save jessejlt/1025732 to your computer and use it in GitHub Desktop.
dim background on mouse-over
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#login { | |
z-index: 2; | |
} | |
#login:after { | |
content: ""; | |
position: fixed; | |
top: 0; | |
left: 0; | |
right: 0; | |
bottom: 0; | |
background: rgba(0,0,0,0.4); | |
z-index: -1; | |
pointer-events: none; | |
} | |
#login:hover:after { | |
z-index: 1; | |
background: rgba(0,0,0,0.75); | |
} | |
#login strong { | |
background: green; | |
padding: 10px; | |
} | |
#login:hover strong { | |
position: relative; | |
z-index: 2; | |
} | |
// example: http://jsfiddle.net/chriscoyier/pVsKe/1/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment