我有一个 div,里面有多个元素,跨度比父 div 的宽度更远。我将overflow-x设置为滚动,并将背景附件设置为滚动,但是当我左右滚动时,背景图像保持固定
这是页面的链接:http: //okcomputerstl.com/K9_Athletic_Club/services.html 砖背景是我想滚动的
这是CSS
.framecontain {
width: 979px;
height: 490px;
position: relative;
overflow-x: scroll;
background-image: url(../graphics/services/brickbg.png);
}
.services .textbox {
position: absolute;
top: 52px;
width: 395px;
height: 358px;
z-index: 2;
background-image: url(../graphics/services/frame.png);
}
.services .one {
left: 64px;
}
.services .two {
left: 508px;
}
.services .three {
left: 953px;
}
.services .four {
left: 1388px;
}
.services .five {
left: 1826px;
}