Heim  >  Artikel  >  Web-Frontend  >  解说css中的margin属性缩写方式_html/css_WEB-ITnose

解说css中的margin属性缩写方式_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:44:061611Durchsuche

<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>

  

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn