Created
March 10, 2014 10:05
-
-
Save hiloki/9462334 to your computer and use it in GitHub Desktop.
---- for demo ---
This file contains hidden or 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
.box { | |
position: relative; | |
margin-left: 0; | |
margin-right: 0; | |
width: 300px; | |
height: 300px; | |
background-color: skyblue; | |
} | |
.obj { | |
width: 88px; | |
height: 88px; | |
line-height: 88px; | |
text-align: center; | |
font-weight: bold; | |
color: #FFF | |
} | |
.obj-a { | |
position: absolute; | |
top: 0; | |
right: 0; | |
z-index: 100; | |
background-color: indianred; | |
} | |
.obj-b { | |
position: absolute; | |
top: 44px; | |
right: 44px; | |
z-index: 10; | |
background-color: green; | |
} | |
.obj-c { | |
position: absolute; | |
top: 88px; | |
right: 88px; | |
z-index: 1; | |
background-color: purple; | |
} | |
/* ---- for demo --- */ | |
* { | |
margin-top: 0; | |
margin-bottom: 0; | |
} | |
body { | |
padding: 50px; | |
} | |
li { | |
margin-left: 1em; | |
} |
This file contains hidden or 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
<div class="box"> | |
<div class="obj obj-a">A</div> | |
<div class="obj obj-b">B</div> | |
<div class="obj obj-c">C</div> | |
</div> |
This file contains hidden or 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
// alert('Hello world!'); |
This file contains hidden or 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
{"view":"split-vertical","fontsize":"140","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment