解说css中的margin属性缩写方式

王朝学院·作者佚名  2016-05-24
窄屏简体版  字體: 小  |  中  |  大  |  超大  

解说CSS中的margin属性缩写方式<html><body><div style="border: 1px solid red;"><div style="border: 1px solid blue; margin: 20px;">margin: 20px;(上、下、左、右各20px。)</div></div><div style="border: 1px solid red;"><div style="border: 1px solid blue; margin: 20px 40px;">margin: 20px 40px;(上、下20px;左、右40px。)</div></div><div style="border: 1px solid red;"><div style="border: 1px solid blue; margin: 20px 40px 60px;">margin: 20px 40px 60px;(上20px;左、右40px;下60px。)</div></div><div style="border: 1px solid red;"><div style="border: 1px solid blue; margin: 20px 40px 60px 80px;">margin: 20px 40px 60px 80px;(上20px;右40px;下60px;左80px。)</div></div><p>在css中使用margin可以将margin-top,margin-right,margin-bottom,margin-left,缩写为一个标记,顺序为<span style="color: #ff0000"><strong>上右下左</strong></span>(顺时针)。</p><p>margin标记可以带一个、二个、三个、四个参数,各有不同的含义 http://www.100sucai.com</p></body></html>

 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
© 2005- 王朝網路 版權所有 導航