css reset是什么意思?


本文摘自PHP中文网,作者藏色散人,侵删。

HTML标签在浏览器中都有默认的样式,例如p标签有上下边距,strong标签有字体加粗样式等。不同浏览器的默认样式之间存在差别,例如ul默认带有缩进样式,在IE下,它的缩进是由margin实现的,而在Firefox下却是由padding实现的。

CSS reset是现在很流行的解决方法是一开始就将浏览器的默认样式全部覆盖掉,开发时浏览器的默认样式可能会给我们带来多浏览器兼容性问题,影响开发效率。

部分CSS reset内容如下

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

html {color:#000;background:#FFF;}t5

body,div,dl,dt,dd,ul,ol,li,

h1,h2,h3,h4,h5,h6,

pre,code,form,fieldset,legend,

input,textarea,p,blockquote,th,td{margin:0;padding:0;}

table {border-collapse:collapse;border-spacing:0;}

fieldset,img {border:0;}

address,caption,cite,code,dfn,em,strong,th,var {font-style:normal;font-weight:normal;}

li {list-style:none;}

caption,th {text-align:left;}

h1,h2,h3,h4,h5,h6 {font-size:100%;font-weight:normal;}

q:before,q:after {content:'';}

abbr,acronym {border:0;font-variant:normal;}

sup {vertical-align:text-top;}

sub {vertical-align:text-bottom;}

input,textarea,select {font-family:inherit;font-size:inherit;font-weight:inherit;}

input,textarea,select {*font-size:100%;}

legend {color:#000;}

相关推荐:《CSS教程》

以上就是css reset是什么意思?的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

css 中 @ 用法详解

css如何添加flash

less.js 输出css怎么查看

css实现div一直旋转的方法

html5 border属性怎么设置?html5 table中的border属性介绍

css文件开头怎么写

css输入框怎么设置不可编辑

怎么在html页面写css样式表

css怎么设置首行缩进2字符

csscss3的区别是什么

更多相关阅读请进入《css》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...