懂者自懂
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | <!DOCTYPE> < html > < head > < meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" /> < meta name = "viewport" content = "width=device-width,initial-scale=1.0,user-scalable=0" > < script > var scale = 1 / devicePixelRatio; document.querySelector('meta[name="viewport"]').setAttribute('content','initial-scale=' + scale + ', maximum-scale=' + scale + ', minimum-scale=' + scale + ', user-scalable=no'); let deviceWidth = document.documentElement.clientWidth; document.documentElement.style.fontSize = deviceWidth / 7.5+ 'px'; </ script > < style > body { font-size:14px; } </ style > </ head > < body > </ body > </ html > |
0 条评论。