为了考察到结构居中成效,我们CSS命名对象为".CSS5",配置CSS边框为彩色,css宽度为400px,css高度为100px。
1、css代码如下:
<style> body{text-align:center} .CSS5{margin:0 auto;width:400px;height:100px;border:1px solid #000} /* CSS批注:设置对象边框、宽度、高度 便于窥察构造成效 */ </style>
2、HTML代码片段:
<div class="CSS5">对象CSS5构造居中了</div>
3、结构居中成绩截图
居中案例造诣截图
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/rumen/r52746.shtml