我认为透明的 PNG 是最好的选择,使用更高的 z 索引使其成为绝对值,并将其放在容器 div 中。这个容器 div 会漂浮在背景滑动图像上吗?我会使用一个非常小的 2 px 切片并沿 y 轴重复它,但我可能无法正确看到您的问题。
我用我重复向下 (y) 的一小片辐射进行了尝试,底层图像确实滚动了顶部透明图像。如果我遵循您正在尝试做的事情。它适用于 chrome、firefox 和 safari:这里是 css
#container {
background-attachment: scroll;
background-image: url(Untitled-1.jpg);
background-repeat: repeat-x;
clear: both;
float: left;
height: 768px;
width: 80000px;
position: relative;
}
#container #info {
float: left;
width: 630px;
margin-right: 20%;
margin-left: 20%;
position: fixed;
margin-top: 100px;
height: 519px;
clear: both;
clip: rect(100px,auto,auto,auto);
}
#container #info #l_side {
background-image: url(left_.png);
background-repeat: repeat-y;
float: left;
height: 519px;
width: 165px;
position: relative;
margin-right: -2px;
}
#container #info #content {
background-color: rgba(0, 0, 255, 0.56);
color: rgba(0, 0, 255, 0.56);
float: left;
height: 519px;
width: 300px;
position: relative;
}
#container #info #r_side {
background-image: url(Right.png);
background-repeat: repeat-y;
float: left;
height: 519px;
width: 165px;
position: relative;
margin-left: -1px;
}