Skip to content

Instantly share code, notes, and snippets.

@xiaody
Created February 25, 2013 11:21
Show Gist options
  • Save xiaody/5029211 to your computer and use it in GitHub Desktop.
Save xiaody/5029211 to your computer and use it in GitHub Desktop.
z-index test
/**
* z-index test
*/
.box {
border: 2px solid black;
width: 200px;
height: 200px;
}
#box1 {
background: yellow;
position: relative;
z-index: -1;
}
#box11 {
background: green;
z-index: 1000;
}
#box2 {
margin-top: -50px;
margin-left: 50px;
background: blue;
position: relative;
}
#box3 {
margin-top: -50px;
margin-left: 100px;
background: grey;
}
<!-- content to be placed inside <body>…</body> -->
<div id=box1 class=box>
<div id=box11 class=box>darkflame master;darkflame master;darkflame master;darkflame master;darkflame master;darkflame master;darkflame master;darkflame master;darkflame master;</div>
</div>
<div id=box2 class=box></div>
<div id=box3 class=box></div>
// alert('Hello world!');
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment