解决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这四个属性就可以解决这个问题了。

posted @ 2018-06-20 10:11  Ocean丶  阅读(1119)  评论(0编辑  收藏  举报