这篇文章给大家介绍的内容是关于HTML5属性:margin属性的用法实例,有一定的参考价值,有需要的朋友可以参考一下,希望对你有所帮助。
Documentp{
width: 100px;
height: 100px;
background-color: red;
/* 外边距 */
margin-top: 30px;
margin-left: 100px;
margin-right: 100px;
margin-bottom: 100px;
/* 连写 */
margin: 40px;
margin: 0 auto;
/* 内边距 pandding */
padding: 30px;
}
p第一个
p第二个
运行效果如下:
相关推荐:
HTML5属性:form表单属性的用法实例
HTML5中div标签的实例代码