CSS reset style sheet, css style sheet
I. Why do I need to reset the style sheet?
Even if you do not write CSS styles, HTML tags also have styles in the browser. These styles come from the browser itself. But the problem is that different browsers may have different default styles. CSS resets the style sheet to solve this problem.
Ii. Frequently Used style sheet resetting
(1) simple violence
Only one row:
* {Margin: 0; padding: 0 ;}
The wildcard "*" matches all tags and is generally considered to be of poor performance.
(2) return to zero
Almost all labels are cleared. For example, reset a style sheet for YUI (http://yuilibrary.com.
(3) retain the basic style
Instead of clearing the default style of all labels, the original style of the label is retained based on the unified style of Each browser. For example: normalize.css (https://github.com/necolas/normalize.css)
(4) custom type
Custom reset styles should be the best, and you can reset the styles of tags if you use them. However, we do not know which labels will be used by others after the project is transplanted or when many people work together. For convenience, we usually use the type (2) or (3) to reset the style sheet.