Initial setup of HTML with CSS

  In peacetime, when writing code, encounter content or context of the case can not be completely fit close to the border of the page, look carefully, you will find that your browser is set to the body from the outside.

  

  

  It can be seen from the browser bdoy set up outside 8px distance, therefore, before you start, you should set the page is initialized.

  

body
{
    margin: 0;
    padding: 0;
}

  Thus, the basic completion of the initialization can be set according to their own margins content

  Typically, the page layout will be used in an unordered list and a link, unordered list ul, the solid dots present by default we do not need, underlined a link in the content, did not appear, so you can put together with the body, the new page initialization settings, remove ul list tag dots and a link to the content underscore

  Can do a reset.css, application HTML page, be initialized, and then to set margins according to their needs, need to consider the browser comes margins, resulting in unnecessary trouble

body
{
    margin: 0;
    padding: 0;
}
a
{
    text-decoration: none;
}
ul
{
    list-style-type: none;
    padding: 0;
    margin: 0;
}

 

  

Guess you like

Origin www.cnblogs.com/zhangcheng001/p/10950917.html
Recommended