类似官网背景图固定
直接上代码
height: 690px;
background: url(https://cjwx.oss-cn-zhangjiakou.aliyuncs.com/front/mp/company/com-banner.jpg) no-repeat center top;
background-attachment: fixed; //主要是这行
display: flex;
justify-content: center;
align-items: center;
margin-top: -64px; //导航栏的高度
background-size: 100%;