Part 1 normalize.css
Used to solve the problem of inconsistent display in different browsers
8 to 12 rows
HTML {font-family: sans-serif;/* set the default font to sans-serif */-WebKit-text-size-adjust: 100%; /* the font size of devices such as mobile phones is automatically adjusted */-MS-text-size-adjust: 100%;/* If the zoom function is disabled, this setting is invalid */}
Text-size-adjust only contains the prefix of IE and Safari due to compatibility issues.
It is only set in HTML, because the body is inherited, and if it is set on the body, the page scaling function will be invalid.
To disable the zoom function, you only need to assign a value of none:
-webkit-text-size-adjust: none;-moz-text-size-adjust:none; -ms-text-size-adjust: none;text-size-adjust: none
Lines 13 to 15
body { margin: 0;}
Clear the default margin settings of the body.
Lines 16 to 29
Article,/* Article */aside,/* Note column */details,/* Additional information */figcaption,/* independent stream element title */figure, /* independent images and tables. deletion does not affect page display */footer,/* footer */header,/* Header */hgroup, /* group title */Main,/* main content in the body, only one block */Nav,/* Navigation */section, /* block */Summary {/* abstract */display: block ;}
Set the default display mode to block.
30 to 36 rows
audio,canvas,progress,video { display: inline-block; vertical-align: baseline;}
Set the default display style of audio, video, and progress bar to embedded blocks.
Vertical Alignment vertical-align is the baseline alignment relative to the parent element,
See the following:
37 to 40 rows
audio:not([controls]) { display: none; height: 0;}
If the audio does not have the CONTROLS attribute (that is, there is no control column), it is not displayed and the height value is 0.
41 to 44 rows
[hidden],template { display: none;}
The display mode of the hideen attribute is not displayed.
Set the template element template to not be displayed on the page.
45 to 51 rows
a { background: transparent;}a:active,a:hover { outline: 0;}
Set the Default background color of link a to transparent, that is, display the color of the parent element.
Remove the outer border outline of the link when the link gets the Focus active and hover the mouse over the hover.
52 to 54 rows
abbr[title] { border-bottom: 1px dotted;}
Set the width of the Bottom Border of the title attribute of the abbr to 1 pixel, and the style to a dot.
55 to 58 rows
b,strong { font-weight: bold;}
Set the default font style of Element B and strong to bold.
59 to 61 rows
dfn { font-style: italic;}
Set the font display style of the term Label dfn to italic.
62 to 65 rows
h1 { margin: .67em 0; font-size: 2em;}
Set the margin of Title 1 to up and down. 67em, left and right to 0, and the font size to 2em.
Em is the size relative to the parent element. If the font size of the parent element is 16 PX, 0.67em = 16*0.67 = 10.72px.
Another REM unit is more convenient than the root element HTML, but not all browsers currently support it.
66 to 69 rows
mark { color: #000; background: #ff0;}
Set the default color of the Mark label to black, and the background color to magenta.
To be continued...