Skip to content

Instantly share code, notes, and snippets.

@scottoffen
Created June 30, 2014 16:54
Show Gist options
  • Save scottoffen/bed1b3dc12f209b843d3 to your computer and use it in GitHub Desktop.
Save scottoffen/bed1b3dc12f209b843d3 to your computer and use it in GitHub Desktop.
HTML CSS Layers Example
<!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