一.视差滚动(经过优化后的代码)
.front::before { content: ‘‘; position: fixed; // 代替background-attachment width: 100%; height: 100%; top: 0; left: 0; background-color: white; background: url(/img/front/mm.jpg) no-repeat center center; background-size: cover; will-change: transform; // 创建新的渲染层 z-index: -1; }
原文:https://www.cnblogs.com/qdwz/p/12218717.html