// 当屏幕宽度发生变化的时候,会执行如下的方法
window.onresize = () => {
return (() => {
console.log("222 ------------- ", document.body.clientWidth)
})();
};
// 当屏幕宽度发生变化的时候,会执行如下的方法
window.onresize = () => {
return (() => {
if (document.body.clientWidth > 1340) {
document.getElementById("home").classList.remove('home_1100')
document.getElementById("home").classList.add('home')
} else {
document.getElementById("home").classList.add('home_1100')
document.getElementById("home").classList.remove('home')
}
})();
};