1、代码
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>margin间距</title> <style> .main-a{border:1px solid #F00; width:200px;} .main-b{margin:10px 20px 30px 40px; border:1px solid #F00; width:200px;} .main-c{border:1px solid #F00; width:200px;} </style> </head>
<body> <div class="main-a"> 未设置margin </div> <div class="main-b"> 设置上外边距为10px、右20px、下30px、右40px,留心观察,此盒子间距。<br /> 外观DW软件,看看间距截图 </div> <div class="main-c"> 未设置装备摆设margin </div> </body> </html>
对main-b对象配置css margin外间距花式,大约拷贝代码考查观察,修改margin的值保管涉猎器测试再考察观察便可把握margin css属性。
2、造诣截图
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/jiqiao/j52931.shtml