Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
<div id="background"> <img src="images/Untitled.gif" id="Image5" alt="" style="background-repeat:repeat-y;width:273px;height:68px;"/> </div>
我想让图像在水平方向上重复,我想我可以通过将其设置为背景图像来做到这一点,但它不起作用。告诉我我做错了什么谢谢。
试试这个:
<div style="height: 100px; background-image:url('picture.jpg'); background-repeat:repeat-x;"> Your text here. </div>
您可以使用背景使其水平重复,但背景需要在容器上,而不是在容器img本身上。做这样的事情:
img
<div style="height: 68px; background: url(image.png);"></div>