解决css布局时两个div一个宽度固定另一个占满剩余宽度的问题

/*左侧div*/

.left-div{width: 220px;height: 100%;position: fixed;background: #FFFFFF;}

/*右侧div*/

.right-div{top: 0px; bottom:0px;left:220px;right:0px;position: fixed;background: #000000;}

解决思路就是将左侧的div的高度和宽度设置好,然后右侧div只需要设置top,bottom,left,right这四个属性就可以解决这个问题了。

猜你喜欢

转载自www.cnblogs.com/2016-10-07/p/9202455.html
今日推荐