Created
May 15, 2013 17:56
-
-
Save yurfuwa-chan/5585932 to your computer and use it in GitHub Desktop.
s
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
<html> | |
<body> | |
<style> | |
.box{ | |
height :40px; | |
width: 50%; | |
background: red; | |
} | |
.res{ | |
display: -webkit-box; | |
} | |
@media screen and (max-width:400px){ | |
.res{ | |
display: block; | |
width: 200px; | |
} | |
.res .box{ | |
width: 100%; | |
} | |
} | |
</style> | |
<h2> The Liquid Layout</h2> | |
<div style=""> | |
<div class="box" style="float: left;"> | |
</div> | |
<div class="box" style="background: black;float: right;"> | |
</div> | |
</div> | |
<h2>The Fixed Layout</h2> | |
<div style="max-width:400px;min-width:200px;"> | |
<div class="box" style="background:blue;width: 200px;float: left;"> | |
</div> | |
<div class="box" style="width: 200px;float: left;"> | |
</div> | |
</div> | |
<h2 style="clear:both;">The Box Layout via MediaQuery</h2> | |
<div class="res"> | |
<div class="box"> | |
</div> | |
<div class="box" style="background:black;"> | |
</div> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment