task#14196,kpi界面适配web端更改css样式
This commit is contained in:
@ -38,12 +38,12 @@
|
||||
let resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
|
||||
recalc = function () {
|
||||
var clientWidth = docEl.clientWidth;
|
||||
console.log("clientWidth",clientWidth)
|
||||
// console.log("clientWidth",clientWidth)
|
||||
if (!clientWidth) return;
|
||||
if (clientWidth < 400) {
|
||||
clientWidth = 400;
|
||||
}
|
||||
docEl.style.fontSize = 20 * (clientWidth / 700) + 'px';
|
||||
docEl.style.fontSize = 18 * (clientWidth / 650) + 'px';
|
||||
};
|
||||
if (!doc.addEventListener) return;
|
||||
var isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
@ -53,7 +53,7 @@
|
||||
win.addEventListener(resizeEvt, recalc, false);
|
||||
doc.addEventListener('DOMContentLoaded', recalc, false);
|
||||
}
|
||||
console.log("isMobile",isMobile)
|
||||
// console.log("isMobile",isMobile)
|
||||
})(document, window);
|
||||
</script>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user