我正在尝试制作一个非常简单的侧滚动/视差页面,该页面具有3层“ div”,并在Android 25上运行动画背景。
<AbsoluteLayout width = "100%" height = "100%" class = "city">
<AbsoluteLayout width = "200%" height = "100%" backgroundRepeat = "repeatX" bottom = "0" class = "parallax2"></AbsoluteLayout>
<AbsoluteLayout width = "200%" height = "100%" backgroundRepeat = "repeatX" bottom = "0" class = "parallax3"></AbsoluteLayout>
<AbsoluteLayout width = "400%" height = "100%" backgroundRepeat = "repeatX" bottom = "0" left = "-100%" class = "parallax"></AbsoluteLayout>
</AbsoluteLayout>
问题是repeat-x的CSS不起作用!
background-image: url('~/images/parallax0.png');
background-position: bottom;
background-repeat: repeat-x;
如果将repeat-x更改为只是重复,则图像将垂直重复(y),如果完全移除background-repeat
,图像将重复相同,但是我无法像在水平方向(x)上那样重复图像好吧。
我想念什么?这是一个本机脚本错误吗?