视口的宽和高
var pw = window.innerWidth, ph = window.innerHeight; if(typeof pw != "number"){ pw = document.documentElement.clientWidth; ph = document.documentElement.clientHeight; } console.log(pw,ph);
本文共 254 字,大约阅读时间需要 1 分钟。
视口的宽和高
var pw = window.innerWidth, ph = window.innerHeight; if(typeof pw != "number"){ pw = document.documentElement.clientWidth; ph = document.documentElement.clientHeight; } console.log(pw,ph);
转载于:https://www.cnblogs.com/xupeiyu/p/4677252.html