温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

常用元素默认margin和padding值的示例分析

发布时间:2021-10-13 11:28:25 来源:亿速云 阅读:142 作者:小新 栏目:移动开发

这篇文章主要为大家展示了“常用元素默认margin和padding值的示例分析”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“常用元素默认margin和padding值的示例分析”这篇文章吧。

代码如下:


// body的margin值
firefox 20.0 ----------------------- body的margin为: margin:8px 8px 8px 8px;
Internet Explorer 6.0 ----------- body的margin为: margin:15px 10px 15px 10px;
Internet Explorer 7.0 ----------- body的margin为: margin:16px 11px 16px 11px;
Internet Explorer 8.0-10.0 ---- body的margin为: margin:16px 8px 16px 8px;
Opera 12.11 --------------------- body的margin为: margin:16px 8px 16px 8px;
Safari 5.1 ------------------------- body的margin为: margin:16px 8px 16px 8px;
Google Chrome 27.0 --------- body的margin为: margin:16px 8px 16px 8px;

// h2的margin值
firefox 20.0 ----------------------- h2的margin为: margin:21px 0 22px 0;
Internet Explorer 6.0 ----------- h2的margin为: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- h2的margin为: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h2的margin为: margin:20px 0 20px 0;
Opera 12.11 --------------------- h2的margin为: margin:21px 0 21px 0;
Safari 5.1 ------------------------- h2的margin为: margin:21px 0 21px 0;
Google Chrome 27.0 --------- h2的margin为: margin:21px 0 22px 0;

// h3的margin值
firefox 20.0 ----------------------- h3的margin为: margin:20px 0 20px 0;
Internet Explorer 6.0 ----------- h3的margin为: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- h3的margin为: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h3的margin为: margin:20px 0 20px 0;
Opera 12.11 --------------------- h3的margin为: margin:19px 0 19px 0;
Safari 5.1 ------------------------- h3的margin为: margin:19px 0 19px 0;
Google Chrome 27.0 --------- h3的margin为: margin:20px 0 20px 0;

// h4的margin值
firefox 20.0 ----------------------- h4的margin为: margin:19px 0 18px 0;
Internet Explorer 6.0 ----------- h4的margin为: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- h4的margin为: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h4的margin为: margin:19px 0 18px 0;
Opera 12.11 --------------------- h4的margin为: margin:18px 0 18px 0;
Safari 5.1 ------------------------- h4的margin为: margin:18px 0 18px ;
Google Chrome 27.0 --------- h4的margin为: margin:19px 0 18px 0;

// h5的margin值
firefox 20.0 ----------------------- h5的margin为: margin:22px 0 21px 0;
Internet Explorer 6.0 ----------- h5的margin为: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- h5的margin为: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h5的margin为: margin:22px 0 21px 0;
Opera 12.11 --------------------- h5的margin为: margin:16px 0 16px 0;
Safari 5.1 ------------------------- h5的margin为: margin:21px 0 21px 0;
Google Chrome 27.0 --------- h5的margin为: margin:22px 0 21px 0;

// h6的margin值
firefox 20.0 ----------------------- h6的margin为: margin:22px 0 22px 0;
Internet Explorer 6.0 ----------- h6的margin为: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- h6的margin为: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h6的margin为: margin:22px 0 22px 0;
Opera 12.11 --------------------- h6的margin为: margin:22px 0 22px 0;
Safari 5.1 ------------------------- h6的margin为: margin:22px 0 22px 0;
Google Chrome 27.0 --------- h6的margin为: margin:22px 0 22px 0;

// h7的margin值
firefox 20.0 ----------------------- h7的margin为: margin:25px 0 25px 0;
Internet Explorer 6.0 ----------- h7的margin为: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- h7的margin为: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- h7的margin为: margin:25px 0 25px 0;
Opera 12.11 --------------------- h7的margin为: margin:24px 0 24px 0;
Safari 5.1 ------------------------- h7的margin为: margin:24px 0 24px 0;
Google Chrome 27.0 --------- h7的margin为: margin:28px 0 28px 0;

// dl的margin值
firefox 20.0 ----------------------- dl的margin为: margin:16px 0 16px 0;
Internet Explorer 6.0 ----------- dl的margin为: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- dl的margin为: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- dl的margin为: margin:16px 0 16px 0;
Opera 12.11 --------------------- dl的margin为: margin:16px 0 16px 0;
Safari 5.1 ------------------------- dl的margin为: margin:16px 0 16px 0;
Google Chrome 27.0 --------- dl的margin为: margin:16px 0 16px 0;

// dd的margin值
firefox 20.0 ----------------------- dd的margin为: margin:0 0 0 40px;
Internet Explorer 6.0 ----------- dd的margin为: margin:0 0 0 40px;
Internet Explorer 7.0 ----------- dd的margin为: margin:0 0 0 40px;
Internet Explorer 8.0-10.0 ---- dd的margin为: margin:0 0 0 40px;
Opera 12.11 --------------------- dd的margin为: margin:0 0 0 40px;
Safari 5.1 ------------------------- dd的margin为: margin:0 0 0 40px;
Google Chrome 27.0 --------- dd的margin为: margin:0 0 0 40px;

// ul的margin值
firefox 20.0 ----------------------- ul的margin为: margin:16px 0 16px 0;
Internet Explorer 6.0 ----------- ul的margin为: margin:19px 0 19px 40px;
Internet Explorer 7.0 ----------- ul的margin为: margin:19px 0 19px 40px;
Internet Explorer 8.0-10.0 ---- ul的margin为: margin:16px 0 16px 0;
Opera 12.11 --------------------- ul的margin为: margin:16px 0 16px 0;
Safari 5.1 ------------------------- ul的margin为: margin:16px 0 16px 0;
Google Chrome 27.0 --------- ul的margin为: margin:16px 0 16px 0;

// ol的margin值
firefox 20.0 ----------------------- ol的margin为: margin:16px 0 16px 0;
Internet Explorer 6.0 ----------- ol的margin为: margin:19px 0 19px 40px;
Internet Explorer 7.0 ----------- ol的margin为: margin:19px 0 19px 40px;
Internet Explorer 8.0-10.0 ---- ol的margin为: margin:16px 0 16px 0;
Opera 12.11 --------------------- ol的margin为: margin:16px 0 16px 0;
Safari 5.1 ------------------------- ol的margin为: margin:16px 0 16px 0;
Google Chrome 27.0 --------- ol的margin为: margin:16px 0 16px 0;

// ul的padding值
firefox 20.0 ----------------------- ul的padding为: padding:0 0 0 40px;
Internet Explorer 6.0 ----------- ul的padding为: padding:0 0 0 0;
Internet Explorer 7.0 ----------- ul的padding为: padding:0 0 0 0;
Internet Explorer 8.0-10.0 ---- ul的padding为: padding:0 0 0 40px;
Opera 12.11 --------------------- ul的padding为: padding:0 0 0 40px;
Safari 5.1 ------------------------- ul的padding为: padding:0 0 0 40px;
Google Chrome 27.0 --------- ul的padding为: padding:0 0 0 40px;

// ol的padding值
firefox 20.0 ----------------------- ol的padding为: padding:0 0 0 40px;
Internet Explorer 6.0 ----------- ol的padding为: padding:0 0 0 0;
Internet Explorer 7.0 ----------- ol的padding为: padding:0 0 0 0;
Internet Explorer 8.0-10.0 ---- ol的padding为: padding:0 0 0 40px;
Opera 12.11 --------------------- ol的padding为: padding:0 0 0 40px;
Safari 5.1 ------------------------- ol的padding为: padding:0 0 0 40px;
Google Chrome 27.0 --------- ol的padding为: padding:0 0 0 40px;

// p的margin值
firefox 20.0 ----------------------- p的margin为: margin:16px 0 16px 0;
Internet Explorer 6.0 ----------- p的margin为: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- p的margin为: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- p的margin为: margin:16px 0 16px 0;
Opera 12.11 --------------------- p的margin为: margin:16px 0 16px 0;
Safari 5.1 ------------------------- p的margin为: margin:16px 0 16px 0;
Google Chrome 27.0 --------- p的margin为: margin:16px 0 16px 0;

// thead,tbody,tfoot的margin值
firefox 20.0 ----------------------- thead,tbody,tfoot的margin为: margin:2px 2px 2px 2px;
Internet Explorer 6.0 ----------- thead,tbody,tfoot的margin为: margin:2px 2px 2px 2px;
Internet Explorer 7.0 ----------- thead,tbody,tfoot的margin为: margin:2px 2px 2px 2px;
Internet Explorer 8.0-10.0 ---- thead,tbody,tfoot的margin为: margin:2px 2px 2px 2px;
Opera 12.11 --------------------- thead,tbody,tfoot的margin为: margin:2px 2px 2px 2px;
Safari 5.1 ------------------------- thead,tbody,tfoot的margin为: margin:2px 2px 2px 2px;
Google Chrome 27.0 --------- thead,tbody,tfoot的margin为: margin:2px 2px 2px 2px;

// form的margin值
firefox 20.0 ----------------------- form的margin为: margin:0 0 0 0;
Internet Explorer 6.0 ----------- form的margin为: margin:19px 0 19px 0;
Internet Explorer 7.0 ----------- form的margin为: margin:19px 0 19px 0;
Internet Explorer 8.0-10.0 ---- form的margin为: margin:0 0 0 0;
Opera 12.11 --------------------- form的margin为: margin:0 0 0 0;
Safari 5.1 ------------------------- form的margin为: margin:0 0 0 0;
Google Chrome 27.0 --------- form的margin为: margin:0 0 0 0;

以上是“常用元素默认margin和padding值的示例分析”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注亿速云行业资讯频道!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI