Html
<! DOCTYPE html>
<meta charset= "UTF-8" >
<meta name= "viewport" content= "width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0, User-scalable=no "/>
<meta name= "apple-mobile-web-app-capable" content= "yes"/>
<meta name= "Apple-mobile-web-app-status-bar-style" content= "Black" >
<meta http-equiv= "Pragma" content= "No-cache"/>
<meta name= "format-detection" content= "Telephone=no"/> <!--ignore numbers in page recognition as phone number--
<meta name= "Msapplication-tap-highlight" content= "no" > <!--winphone Remove the Click Effect--
<link rel= "stylesheet" type= "Text/css" href= "Css/base.css" >
<link rel= "stylesheet" type= "Text/css" href= "Css/index.css" >
<script src= "Js/conmon.js" ></script>
<title> Home </title>
<body>
<section>
Content Area
</section>
<footer> feet </footer>
</body>
Css
*{
margin:0;
padding:0;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
Box-sizing:border-box;
-webkit-tap-highlight-color:rgba (0,0,0,0);
}
html{
width:100%;
height:100%;
}
body{
width:100%;
height:100%;
font-family: ' Microsoft yahei ', ' SimSun ', ' Helvetica ';
Word-break:break-all;
Font-size:0.32rem;
width:100%;
}
Article, aside, details, figcaption, figure, Footer, header, Hgroup, Main, nav, section, summary {
Display:block;
}
img{
border:0;
Display:block;
}
li{
List-style:none
}
A
Text-decoration:none;
Color: #000;
}
a:active{
-webkit-tap-highlight-color:rgba (0, 0, 0, 0);
}
input,button{
Outline:none;
}
Js
(Function (doc, win) {
var docel = doc.documentelement,
resizeevt = ' orientationchange ' in window? ' Orientationchange ': ' Resize ',
Recalc = function () {
var clientwidth = docel.clientwidth;
if (!clientwidth) return;
if (clientwidth>=750) {
docEl.style.fontSize = ' 100px ';
}else{
docEl.style.fontSize = * (clientwidth/750) + ' px ';
}
};
if (!doc.addeventlistener) return;
Win.addeventlistener (Resizeevt, Recalc, false);
Doc.addeventlistener (' domcontentloaded ', Recalc, false);
}) (document, window);
Mobile website Universal Template Unit REM