div背景repeat-x的问题
嘿伙计们,我觉得这个很愚蠢。我有一个
设置为较大宽度,跨度比窗口视图端口长,从而添加水平滚动条。下面我有另一个
。此
Hey guys, I feel stupid with this one. I have one <div>
that is set to some large width, spanning longer than the window view port and thus adding a horizontal scrollbar. Below that I have another <div>
. This <div>
has a simple image set as the background-image
with repeat-x
. I can't seem to get the second <div>
to repeat the entire length of the preceding <div>
. Take a look here: http://jsfiddle.net/5CW7T/.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅此处的示例
由于您的父 div 的宽度设置为
2000px
,后来的宽度应该与其父级一样宽,而不是适合浏览器屏幕的100%
。See Example Here
Since your parent div has width set to
2000px
, the later should have the same to be as wide as its parent not100%
which fits browser screen.