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、功效截图
快捷知道和掌控css中margin是甚么意义,拷贝以上代码,理论实践便可熟识,并熟知。
如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css3-style/c53404.shtml