Skip to content

Instantly share code, notes, and snippets.

@jessejlt
Created June 14, 2011 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessejlt/1025732 to your computer and use it in GitHub Desktop.
Save jessejlt/1025732 to your computer and use it in GitHub Desktop.
dim background on mouse-over
#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