.foot不加margin:o auto 為什么也是居中???
.foot里不加margin:0 auto 為什么也是居中???代碼如下:
.top{height:100px;background:blue}
.main{width:800px;height:300px;background:#ccc;margin: 0 auto}
.foot{width:800px;height:100px;background:#900;}
.foot里不加margin:0 auto 為什么也是居中???代碼如下:
.top{height:100px;background:blue}
.main{width:800px;height:300px;background:#ccc;margin: 0 auto}
.foot{width:800px;height:100px;background:#900;}
2016-03-21
舉報
2016-03-21
繼承了相鄰元素.main的{margin:0 auto;}屬性
2016-03-22
不好意思啊,是我太粗心了,寫成了<div class="main"><div>?。?!
2016-03-21
為什么我打你帶代碼 ?是沒有加
margin:o auto 的話
? 不居中啊