Maison >interface Web >tutoriel HTML >实现一个div在浏览器水平居中_html/css_WEB-ITnose
1 div {2 margin: 0 auto;3 width: 960px;4 }
body { text-align: center; } div { margin: 0 auto; width: 960px; }
div { position: relative; left: 50%; margin-left: -480px; width: 960px;}