關于left問題
main已經用relative修飾成為具有定位性質的父包含塊,那么left絕對定位后起始坐標不應該是main左上角嗎?為什么left會出現在main下方
.main{width:100%;height:400px;background:red;position:relative;
}
.left{ width:200px;height:400px;position:absolute; background:blue;}
.right{height:400px;margin:0 0 0 210px;background:green;}
.foot{height:80px;background:orange;}
2017-03-02
因為你的right沒有浮動,它還是 一個塊級元素,所以right獨自占據一行,把left就擠到下面去了
2017-02-27
你沒設置top:0px ?.left要有left、top值。.否則是會默認移出的