css 滾動視差電腦版會固定背景,手機版並不會固定背景?不知哪出錯了?
div class="parallax">
div class="bg1"> /div>
div class="text-1">11111111111 /div>
div class="bg2"> /div>
div class="text-1">222222222 /div>
/div>
.parallax [class*="bg"] {
width: 100%;
height: 100vh;
background-repeat: no-repeat;
background-attachment: fixed;
background-position: center center;
background-size: cover;
color: #fff;
}
.bg1 {
background-image: url(../img/3.jpg);
}
.bg2 {
background-image: url(../img/1.jpg);
}