<style>
body{ text-align:center}
.div{ margin:0 auto; width:400px; height:100px; border:1px solid #F00}
</style>
样式写上
div标签中class= "div"
引用样式
结束