Through JS to control the page font size, directly on the code:
(functionvarvarfunctionvar fontSize = $ (window).) width () < 640? $ ( window). Width ()/16:40; Roothtml.css ("Font-size", fontSize); } rootresize (); $ (window). Resize (function() {rootresize ();}); })();
Next you can specify the size of the font-size directly in the page root element, so that you can control the overall page text size adaptive
Body {width:16rem; margin:0 Auto; background-color: #fff; font-size:. 6rem; color:#000;}
Finally, summarize the CSS common styles in the page:
*{-webkit-box-sizing:Border-box;-moz-box-sizing:Border-box;box-sizing:Border-box;margin:0;padding:0;}
body,form,ul,ol,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,p{margin:0;padding:0;}
Div,ul,dl,dt,dd,p,h1,h2,h3,h4,h5,h6{Zoom:1;}
Body{font-family:' Microsoft Yahei ';
/*-webkit-user-select:none;*/
-webkit-text-size-adjust:None;Background-color:#fff;}
Input,select{Line-height:Normal;vertical-align:Middle;}
textarea{font-size:1em;Line-height:1.5em;}
a{text-decoration:None;Color:#000;Outline:0;}
a:visited{text-decoration:None;}a:hover{text-decoration:None;}
IMG{Border:0;Max-width:100%;}Li,ul{List-style:None;}
Body{width:16rem;margin:0 Auto;Background-color:#fff;font-size:. 6rem;Color:#000;}
. Hidden{Display:None;}. Clear{Clear:both;}. CL{Clear:both;}. Zleft{float: Left;}. Zright{float: Right;}
. Zmore{Color:#771d0e!important;}. Zblock{Display:Block;}. zred{Color:red!important;}/*compatible with Apple*/
Input{-webkit-appearance:None;/*Remove input Default style*/}input[type= ' Radio ']{-webkit-appearance:Radio;}input[type= ' submit '],input[type= ' Reset '],input[type= ' button '],input{-webkit-appearance:None;}/*compatible Apple End*/
These are the usual CSS styles that are required for a person to write a mobile page.
Mobile uses JS to control the use of font size with REM