What is the initialization style of PC and mobile web pages?
This article will explain in detail what the initialization style of the PC and mobile web pages is, and the content of the article is of high quality, so the editor will share it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
Pc end style reset
* {margin:0; padding:0;}
Body {font-size:14px; font-family: Microsoft Acer; font-style:normal;}
A {text-decoration:none}
A,a:hover {transition:background 0.5s linear;-webkit-transition:background 0.5s linear;-moz-transition:background 0.5s linear;-o-transition:background 0.5s linear;}
Em, i {font-style: normal;}
Ul, ol, li {list-style: none;}
Img {border:none;vertical-align:middle;}
Input,select,textarea {outline:none;border:none;background:none;}
Textarea {resize:none;}
P {line-height:22px;}
.fl {float: left;}
.fr {float: right;}
.clear {clear:both; height:0px; width:100%; overflow:hidden;}
.position {position:relative;}
/ * Common style * /
.layout {width:1100px; display:table; margin:0 auto;}
/ * head * /
/ * Navigation * /
/ * banner*/
/ * content * /
/ * bottom * /
/ * /
Notes on the mobile page:
1. Mobile style reset
/ * CSS Document * /
* {margin:0;padding:0;-webkit-tap-highlight-color:rgba;-webkit-text-size-adjust:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;font-family:Arial, Microsoft Yahi;}
Img {border:none;max-width:100%;vertical-align:middle;}
Body,p,form,input,button,dl,dt,dd,ul,ol,li,h2,h3,h4,h5,h6,h7 {margin:0;padding:0;list-style:none;overflow-x:hidden}
H2,h3,h4,h5,h6,h7 {font-size:100%;}
Input,textarea {- webkit-user-select:text;-ms-user-select:text;user-select:text;-webkit-appearance:none;font-size:1em;line-height:1.5em;}
Table {border-collapse:collapse;}
Input,select,textarea {outline:none;border:none;background:none;}
A {outline:0;cursor:pointer;*star:_expression (this.onbanner=this.blur ());}
A:link,a:active {text-decoration:none;}
A:visited {text-decoration:none;}
A:hover {color:#f00;text-decoration:underline;}
A {text-decoration:none;-webkit-touch-callout:none;}
Em,i {font-style:normal;}
Li,ol {list-style:none;}
Html {font-size:10px;}
.clear {clear:both;height:0;font-size:0;line-height:0;visibility:hidden; overflow:hidden;}
.fl {float:left;}
.fr {float:right;}
Body {margin:0 auto;max-width:640px; min-width:320px;color:#555; padding-bottom:8%;background:#fef9f1;height:100%;}
Bottom
@ media screen and (max-width:320px) {body,input,select {font-size:10px}}
@ media screen and (min-width:320px) {body,input,select {font-size:11.25px}}
@ media screen and (min-width:400px) {body,input,select {font-size:12.5px}}
@ media screen and (min-width:480px) {body,input,select {font-size:13.75px}}
@ media screen and (min-width:560px) {body,input,select {font-size:15px}}
@ media screen and (min-width:600px) {body,input,select {font-size:16.25px}}
@ media screen and (min-width:640px) {body,input,select {font-size:18px}}
two。 Add the header head in the HTML source file:
On the PC and mobile web page initialization style is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.