Normalize.css和Reset CSS有什么区别? [英] What is the difference between Normalize.css and Reset CSS?

查看:203
本文介绍了Normalize.css和Reset CSS有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道CSS重置是什么,但最近我听说过这个新的东西Normalize.css

I know what CSS Reset is, but recently I heard about this new thing called Normalize.css

Normalize.css 重置CSS

正规化CSS和重置CSS之间有什么区别?

What is the difference between normalizing CSS and resetting CSS?

这只是一个新的动词CSS重置?

Is it just a new buzz word for the CSS Reset?

推荐答案

我使用normalize.css。

I work on normalize.css.

主要区别是:


  1. Normalize.css保留有用的默认值,而不是 >例如,在包括normalize.css之后,元素(例如 sup sub 鲁棒),而在包括reset.css后,它们在视觉上与正常文本不可区分。所以,normalize.css不会给你一个视觉起点(同质)。这可能不是每个人的口味。

  1. Normalize.css preserves useful defaults rather than "unstyling" everything. For example, elements like sup or sub "just work" after including normalize.css (and are actually made more robust) whereas they are visually indistinguishable from normal text after including reset.css. So, normalize.css does not impose a visual starting point (homogeny) upon you. This may not be to everyone's taste. The best thing to do is experiment with both and see which gels with your preferences.

Normalize.css修正了一些超出范围的常见错误对于reset.css。它的范围比reset.css更宽,并且还提供常见问题的错误修复,如:HTML5元素的显示设置,缺少字体继承的表单元素,修正 font-size 渲染 pre ,在IE9中的SVG溢出, c / c>

Normalize.css corrects some common bugs that are out of scope for reset.css. It has a wider scope than reset.css, and also provides bug fixes for common problems like: display settings for HTML5 elements, the lack of font inheritance by form elements, correcting font-size rendering for pre, SVG overflow in IE9, and the button styling bug in iOS.

Normalize.css不会使您的开发工具混乱。使用reset.css时常见的是浏览器CSS调试工具中显示的大型继承链。这不是normalize.css因为目标样式的问题。

Normalize.css doesn't clutter your dev tools. A common irritation when using reset.css is the large inheritance chain that is displayed in browser CSS debugging tools. This is not such an issue with normalize.css because of the targeted stylings.

Normalize.css更模块化。

Normalize.css有更好的文档。 normalize.css代码在内联以及更全面地记录在 GitHub Wiki 。这意味着你可以找出每行代码是做什么,为什么它被包括在内,浏览器之间的区别,更容易运行自己的测试。该项目旨在帮助人们了解浏览器默认呈现元素的方式,并让他们更容易参与提交改进。

Normalize.css has better documentation. The normalize.css code is documented inline as well as more comprehensively in the GitHub Wiki. This means you can find out what each line of code is doing, why it was included, what the differences are between browsers, and more easily run your own tests. The project aims to help educate people on how browsers render elements by default, and make it easier for them to be involved in submitting improvements.

我已在文章中详细介绍了这一点关于normalize.css

I've written in greater detail about this in an article about normalize.css

这篇关于Normalize.css和Reset CSS有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆