添加这一段原生js代码即可完美解决
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"> <script> (function (doc, win) { var docEl = doc.documentElement, resizeEvt = ‘orientationchange‘ in window ? ‘orientationchange‘ : ‘resize‘, recalc = function () { var clientWidth = docEl.clientWidth; if (!clientWidth) return; if(clientWidth>=640){ docEl.style.fontSize = ‘100px‘; }else{ docEl.style.fontSize = 100 * (clientWidth / 640) + ‘px‘; } }; if (!doc.addEventListener) return; win.addEventListener(resizeEvt, recalc, false); doc.addEventListener(‘DOMContentLoaded‘, recalc, false); })(document, window); </script> /*你引进的资源*/ <title>标题</title> </head> <body> /*你的代码*/ html{font-size:100px;} div{width:0.55rem;height:0.60rem} /*宽55px高60px的div*/ </body> </html>