$(function(){
function setRem(){
var clWidth = $(window).width();
var newWidth = clWidth/375*100;
$("html").css("font-size",parseInt(newWidth) + "px");
}
setRem();
$(function(){
var time;
$(window).on("resize",function(){
clearTimeout(time);
time = setTimeout(function(){
setRem();
},100)
})
})
})
调整移动端大小响应
最新推荐文章于 2024-08-14 15:45:18 发布