Created
March 18, 2012 23:32
-
-
Save Hotell/2085236 to your computer and use it in GitHub Desktop.
full page overlay with position fixed
This file contains hidden or 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
/** | |
* full page overlay with position fixed | |
*/ | |
html{ | |
background: #f06; | |
background: #ccc; | |
min-height: 100%; | |
} | |
.overlay{ | |
position: fixed; | |
top:0; | |
right:0; | |
bottom:0; | |
left:0; | |
background:linear-gradient(90deg, #f06, blue); | |
} | |
.overlayWithMargin{ | |
opacity:0.7; | |
position: fixed; | |
top:10px; | |
right:10px; | |
bottom:10px; | |
left:10px; | |
background:linear-gradient(90deg, green, yellow); | |
} |
This file contains hidden or 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
<!-- content to be placed inside <body>…</body> --> | |
<div class="overlay"><h1>100% Overlay</h1></div> | |
<div class="overlayWithMargin"><h1>overlay with 10px margin</h1></div> |
This file contains hidden or 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
{"view":"separate","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.button
{
width: 150px;
padding: 10px;
background-color: #FF8C00;
box-shadow: -8px 8px 10px 3px rgba(0,0,0,0.2);
font-weight:bold;
text-decoration:none;
}
cover{
}
loginScreen
{
height:380px;
width:340px;
margin:0 auto;
position:relative;
z-index:10;
display:none;
background: url(login.png) no-repeat;
border:5px solid #cccccc;
border-radius:10px;
}
loginScreen:target, #loginScreen:target + #cover{
}
.cancel
{
display:block;
position:absolute;
top:3px;
right:2px;
background:rgb(245,245,245);
color:black;
height:30px;
width:35px;
font-size:30px;
text-decoration:none;
text-align:center;
font-weight:bold;
}
Full Source code..CSS Full Screen Overlay
charles