Today, I write the CSS style, which used the <ul> tag, set a series of effects after the run, found that the location and settings are discrepancies. Open the check on Chrome and find the following paragraph in the <ul> label's styles bottom:
UL, menu, dir {
Display:block;
List-style-type:disc;
-webkit-margin-before:1em;
-webkit-margin-after:1em;
-webkit-margin-start:0px;
-webkit-margin-end:0px;
-webkit-padding-start:40px;
}
The next display source is: User Agent stylesheet
After checking the HTML and CSS, we found that there are no special settings, and the HTML header also makes the standard settings. Baidu "User agent stylesheet", found that the browser for different HTML elements, there will be the corresponding CSS default settings.
The workaround:
1, a relatively simple method: set a wildcard style at the beginning of the CSS file, such as *{margin:0px;padding:0px;}, overwriting the default settings of the browser;
2, a more complex approach: to understand the default settings of several common browsers, and then write a separate CSS file, will need to revise the style are written in, later do the project can be shared.
Later, there is time to learn more about this issue before you add.