前端笔记 · 日常 技术 no tag May 5, 2022 背景填满background-image: url("..."); background-size: cover; background-attachment: fixed; background-repeat: no-repeat;监听窗口大小变化window.addEventListener("resize", () => { func(); });