赞
踩
一般两栏布局指的是左边一栏宽度固定,右边一栏宽度自适应,两栏布局的具体实现:
- .outer {
- height: 100px;
- }
- .left {
- float: left;
- width: 200px;
- background: tomato;
- }
- .right {
- margin-left: 200px;
- width: auto;
- background: gold;
- }
- .left{
- width: 100px;
- height: 200px;
- background: red;
- float: left;
- }
- .right{
- height: 300px;
- background: blue;
- overflow: hidden;
- }
- .outer {
- display: flex;
- height: 100px;
- }
- .left {
- width: 200px;
- background: tomato;
- }
- .right {
- flex: 1;
- background: gold;
- }
- .outer {
- position: relative;
- height: 100px;
- }
- .left {
- position: absolute;
- width: 200px;
- height: 100px;
- background: tomato;
- }
- .right {
- margin-left: 200px;
- background: gold;
- }
- .outer {
- position: relative;
- height: 100px;
- }
- .left {
- width: 200px;
- background: tomato;
- }
- .right {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 200px;
- background: gold;
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。