Created
March 30, 2014 23:32
-
-
Save rocketxujia/9881743 to your computer and use it in GitHub Desktop.
双飞翼布局及其他方案
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
.wrap{ | |
width: 980px; | |
margin: 20px auto; | |
background: #f8f8f8; | |
} | |
.wrap .main, .wrap .sub, .wrap .secondy{ | |
background: #f0f0f0; | |
} | |
.wrap .sub{ | |
height: 300px; | |
} | |
/*layout-float*/ | |
.layout-float{ | |
margin-top: 12px; | |
} | |
.layout-float:after{ | |
display: table; | |
height: 0px; | |
clear: both; | |
content: "\0020"; | |
} | |
.layout-float .main-wrap{ | |
float: left; | |
width: 100%; | |
} | |
.layout-float .main{ | |
margin: 0 300px 0 200px; | |
} | |
.layout-float .sub{ | |
float: left; | |
width: 180px; | |
margin-left: -100%; | |
margin-right: 20px; | |
} | |
.layout-float .secondy{ | |
float: left; | |
width: 280px; | |
margin-left: -280px; | |
} | |
/*layout-relative*/ | |
.layout-relative{ | |
position: relative; | |
} | |
.layout-relative .main{ | |
margin: 0 300px 0 200px; | |
} | |
.layout-relative .sub{ | |
position:absolute; | |
top: 0px; | |
left: 0px; | |
width: 180px; | |
margin-right: 20px; | |
} | |
.layout-relative .secondy{ | |
position: absolute; | |
top: 0px; | |
right: 0px; | |
width: 280px; | |
margin-left: 20px; | |
} |
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="wrap layout-float"> | |
<div class="main-wrap"> | |
<div class="main"> | |
main-content | |
</div> | |
</div> | |
<div class="sub">sub</div> | |
<div class="secondy">secondy</div> | |
</div> | |
<div class="wrap layout-relative"> | |
<div class="main">main</div> | |
<div class="sub">sub</div> | |
<div class="secondy">secondy</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
// alert('Hello world!'); |
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