margin: 0px auto;
水平置中無法使用的問題,後來發現
float屬性會影響,並且我沒有設定要置中的元素寬度,因此最後修改成這樣就可以了。
div.center{
margin: 0px auto !important;
float: none; /*這會消除margin auto 的功能*/
width: 100%;
height: 100%;
max-width: 127px;
max-height: 117px;
}
沒有留言:
張貼留言