Created
April 16, 2012 22:13
-
-
Save robhrt7/2402023 to your computer and use it in GitHub Desktop.
Пример абс и static для tohtml.it
This file contains 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
.wrapper { | |
width: 100px; | |
margin-bottom: 10px; | |
position: relative; | |
} | |
.static { | |
/* position: static - блоки по умолчанию статичны */ | |
overflow: hidden; | |
width: 77px; | |
height: 77px; | |
margin: 20px; | |
padding: 5px; | |
background: red; | |
} | |
.absolute { | |
position: absolute; | |
right: -20px; | |
top: 20px; | |
width: 40px; | |
height: 40px; | |
background: green; | |
color: #fff; | |
} | |
.relative { | |
position: relative; | |
} | |
.fixed { | |
position: fixed; | |
left: 115px; | |
top: 0; | |
} |
This file contains 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="wrapper"> | |
<div class="static overflow-hidden"> | |
1 static | |
<div class="absolute">abs</div> | |
</div> | |
</div> | |
<div class="wrapper"> | |
<div class="static relative"> | |
2 relative | |
<div class="absolute">abs</div> | |
</div> | |
</div> | |
<div class="wrapper"> | |
<div class="static fixed"> | |
3 fixed | |
<div class="absolute">abs</div> | |
</div> | |
</div> | |
|
This file contains 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