Home  >  Article  >  Web Front-end  >  Default margin_html/css_WEB-ITnose for body in CSS

Default margin_html/css_WEB-ITnose for body in CSS

WBOY
WBOYOriginal
2016-06-24 11:38:371228browse

The default margin of the body in CSS

In general browsers, the default margin setting for the body tag is 8px. Of course, different browsers will set it to different values. , it is provided by the user-agent-stylesheet of the browser. The user-agent-stylesheet of some browsers can be modified by the user, but some browsers cannot, so developers cannot rely on this to modify the browser. Default setting. If we want to modify the default value of the body, just overwrite its css style:

body {  margin: 0px;  padding: 0px;  ...}

If we want to set the same default value on different browsers, we can use normalize.css to keep it consistent .

Copyright Statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

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