背景填满
background-image: url("...");
background-size: cover;
background-attachment: fixed;
background-repeat: no-repeat;
监听窗口大小变化
window.addEventListener("resize", () => {
func();
});
天下学问,惟夜航船中最难对付。
background-image: url("...");
background-size: cover;
background-attachment: fixed;
background-repeat: no-repeat;
window.addEventListener("resize", () => {
func();
});