解決css佈局時兩個div一個寬度固定另外一個佔滿剩餘寬度的問題

/*左側div*/it

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

/*右側div*/top

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

解決思路就是將左側的div的高度和寬度設置好,而後右側div只須要設置top,bottom,left,right這四個屬性就能夠解決這個問題了。position

相關文章
相關標籤/搜索