1、窗口等比例缩放
const designWidth = 375 const scale = document.documentElement.clientWidth/designWidth let viewport = document.querySelector('meta[name='viewport']') let content = 'width=device-width' + ',initial-scale=' + scale + ',minimum-scale=' + scale + ',maximum-scale=' + scale + ',user-scalable=no' viewport.setAttribute('content', content)
标签:scale,const,designWidth,content,width,移动,viewport From: https://www.cnblogs.com/JC30705/p/17838985.html