媒体查询写法
<meta content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" name="viewport" /> /*头部需要引用*/
/*css样式需要添加*/
html{
font-size: calc(100vw / 3.75);
max-width: 750px;
min-height: 320px;
}
@media screen and (max-width: 760px) {}
/*js添加*/
<script>
document.documentElement.style.fontSize = document.documentElement.innerWidth / 3.75 + "px";
window.onresize = function() {
document.documentElement.style.fontSize = document.documentElement.innerWidth / 3.75 + "px";
};
</script>