头闻号

上海欧金实业有限公司

食品添加剂|碳酸盐|硼酸盐|其他无机盐|氢氧化锂

首页 > 新闻中心 > 科技常识:css的margin缩写方式有效提高书写效率
科技常识:css的margin缩写方式有效提高书写效率
发布时间:2023-02-01 09:51:43        浏览次数:4        返回列表

今天小编跟大家讲解下有关css的margin缩写方式有效提高书写效率 ,相信小伙伴们对这个话题应该有所关注吧,小编也收集到了有关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标记可以带一个、二个、三个、四个参数 各有不同的含义。</p> </body> </html>

来源:爱蒂网