Created
April 26, 2013 13:48
-
-
Save patrickmooney/5467495 to your computer and use it in GitHub Desktop.
Full screen alpha black out - handy for layering.
The overlay div will be 100% width and height, fixed to the top left. It uses a height of 2000px due to the screen not know where to draw the div when touch scrolling on mobile devices. Tested on iOS and Android.
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
<!doctype html> | |
<html> | |
<head> | |
<title>Overlay Test</title> | |
<style> | |
div.overlay{ | |
position:fixed; | |
top:0; | |
left:0; | |
width:100%; | |
height:2000px; | |
background-color: black; | |
z-index:100; | |
opacity:0.7; | |
} | |
</style> | |
</head> | |
<body> | |
<div> | |
Below | |
</div> | |
<div class="overlay"> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment