Skip to content

Instantly share code, notes, and snippets.

@hidoos
Created March 24, 2014 05:54
Show Gist options
  • Save hidoos/9734866 to your computer and use it in GitHub Desktop.
Save hidoos/9734866 to your computer and use it in GitHub Desktop.
z-index demo
/**
* z-index demo
*/
body,div,p{
margin:0;
padding:0;
}
body{
font-size:0}
.menu{
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
font-size:14px;
}
.menu{
width:300px;
height:300px;
float:left;
}
.menu p{
margin-left:200px;
box-shadow:1px 1px 1px red;
box-radius:2px;
height:200px;
background:red;
width:500px;
position:relative;
}
.main{
float:left;
display:inline-block;
background:#ccc;
width:400px;
height:300px;
font-size:14px;
}
<!-- content to be placed inside <body>…</body> -->
<div class="menu">
<p>ceshi</p>
</div>
<div class="main">
</div>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
@hidoos
Copy link
Author

hidoos commented Mar 24, 2014

z-index的应用

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment