子元素超出父元素
子元素的寬度超出父元素了怎么辦?。?.top{width:1000px;height:50px;} .main{background:red; width:1000px; height:400px;} .left{background:blue;position:absolute; width:200px; height:400px;} .right{background:green; height:400px; position:absolute; margin-left:210px; width:70%;} .foot{; width:1000px; height:50px;}
2016-11-03
試過了,那個不行。我試出用絕對定位的方式可以。父元素相對定位,left絕對定位,right調節左邊距就行了 。
2016-11-03
可以嘗試著添加float元素,和?margin:0 auto 讓div居中顯示