两列布局:左侧定宽,右侧自适应
方法一:利用float和负外边距
Document *{ margin: 0; padding: 0; } .main,.sitebar{ font: bolder 20px/300px; } .main{ width: 100%; float: left; } .main .content{ margin-left: 200px; background-color: red; } .sitebar{ width: 200px; float: left; background-color: green; margin-left: -100%; }
右侧主体自适应区块
查看更多关于CSS两列及三列自适应布局方法整理_html/css_WEB-ITnose的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did110452