天下学问,惟夜航船中最难对付。

前端笔记

背景填满

background-image: url("...");
background-size: cover;
background-attachment: fixed;
background-repeat: no-repeat;

监听窗口大小变化

window.addEventListener("resize", () => {
func();
});

添加新评论