Created
October 23, 2014 07:19
-
-
Save trongthanh/328c5795c421b7a9bd0c to your computer and use it in GitHub Desktop.
Position Property & Absolute Positioning Context 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
/** | |
* Position Property & Absolute Positioning Context Demo | |
*/ | |
div { | |
padding: 10px; | |
} | |
.main { | |
width: auto; | |
border: 5px solid lightgreen; | |
background-color: AliceBlue; | |
/*position: relative;*/ | |
} | |
.box { | |
width: 150px; height: 150px; | |
border: 1px dashed black; | |
background: hsla(25, 75%, 47%, 0.7); | |
/*position: relative;*/ | |
} | |
.box-child { | |
width: 40%; height: 40%; | |
background: hsla(10, 75%, 47%, 0.5); | |
/*position: absolute;*/ | |
} |
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="main"> | |
<strong>.main</strong> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Alias mollitia maxime aut minima quidem voluptatibus animi quo, in iste, pariatur eveniet sequi explicabo necessitatibus, nihil quasi. Unde, numquam dignissimos reiciendis. | |
<div class="box"> | |
.box | |
<div class="box-child"> | |
.box-child | |
</div> | |
</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","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