Home > Web Front-end > HTML Tutorial > CSS reset stylesheet_html/css_WEB-ITnose

CSS reset stylesheet_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:51:41
Original
2262 people have browsed it

1. Why you need to reset the style sheet

Even if you don’t write CSS styles, HTML tags have styles in the browser, and these styles come from the browser itself. But the problem is that the default style may be different in different browsers. CSS reset style sheet is to solve this problem.


2. Commonly used reset style sheets

(1) Simple violent type

Only one line:

*{margin:0; padding:0;}
Copy after login
The wildcard "*" matches all tags and is generally considered to have poor performance.


(2) Zeroing type

(almost) clears all label styles to zero. Such as YUI (http://yuilibrary.com/) reset style sheet.


(3) Keep the basic style

does not clear the default styles of all tags, but unifies all browsers Keep the original style of the label based on the container style. Such as: normalize.css (https://github.com/necolas/normalize.css/)


(4) Customized

Customized reset style should be the best. Reset the styles of those tags that are used. But we don’t know which tags others will use after the project is transplanted or when multiple people collaborate, so for convenience, we generally use the (2) or (3) reset style sheet.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template