css固定背景图位置 实现屏幕滚动时 显示背景图不同区域
主要css代码:
#bc{
width: 1349px;
margin: 0 auto;
background-image: url("../image/apartments-bg.jpg");
height: 766px;
background-size:cover;
background-attachment: fixed;
background-position: center center;
}
鼠标滚动后,背景图显示的区域发生了变化