Created
June 30, 2014 16:54
-
-
Save scottoffen/bed1b3dc12f209b843d3 to your computer and use it in GitHub Desktop.
HTML CSS Layers Example
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 lang=en> | |
<head> | |
<meta charset=utf-8> | |
<title>Layers</title> | |
<style type="text/css"> | |
#loading, #loaded | |
{ | |
position: fixed; | |
top: 0px; | |
left: 0px; | |
right: 0px; | |
bottom: 0px; | |
} | |
#loading | |
{ | |
background-color: blue; | |
z-index: 999; | |
} | |
#loaded | |
{ | |
background-color: red; | |
z-index: 200; | |
} | |
</style> | |
<script> | |
</script> | |
</head> | |
<body> | |
<div id="loading">Loading</div> | |
<div id="loaded">Loaded</div> | |
<script> | |
setTimeout(function () { document.getElementById('loading').style.display = 'none'; }, 3000); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment