Home >Web Front-end >Front-end Q&A >what is css reset

what is css reset

青灯夜游
青灯夜游Original
2021-05-11 14:12:563683browse

css reset, also called CSS rewriting or CSS reset, is used to use CSS code to rewrite the default style of HTML tags, that is, to redefine the tag style, thereby overriding the browser's CSS default properties. It should be noted that when rewriting styles, it is not recommended to use the "*" selector for rewriting, as this will reduce efficiency and affect performance.

what is css reset

The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.

CSS reset, also called CSS rewrite or CSS reset, is used to rewrite the default style of HTML tags.

Some HTML tags have default styles in browsers, such as p tags with top and bottom margins, li tags with list identifiers, etc. These default styles will also differ between different browsers. For example, ul has an indented style by default. Under IE, its indentation is achieved by margin, while under Firefox, its indentation is achieved by padding. of. This will inevitably bring about browser compatibility issues.

Therefore, in CSS code, you can use CSS code to remove these default styles, that is, redefine the label style, thereby overriding the browser's CSS default properties, that is, CSS reset.

It should be noted that when rewriting styles, it is not recommended to use the * selector for rewriting, which will reduce efficiency and affect performance.

Learning video sharing: css video tutorial

The above is the detailed content of what is css reset. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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