s-1.rem自适应
head里
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no"/>
<script>
(function(doc,win){
var docEl = doc.documentElement;
function recalc(){
docEl.style.fontSize = 100* ((docEl.clientWidth > 640 ? 640 : docEl.clientWidth) / 640) + "px";
}
resizeEvt = "orientationchange" in window ? "orientationchange" : "resize";
win.addEventListener(resizeEvt, recalc, false);recalc();
})(document,window);
</script>
*{margin:0;padding:0;}
flex弹性布局不兼容 用float
1rem=100px