[英]Repeat image border vertically
I have looked online for a way to use an image as a border and repeat it vertically so that when the min size of a page has exceeded it will still completely fill in the border on the left and right sides but I cannot seem to find style code that works. 我在网上寻找一种使用图像作为边框并垂直重复的方法,这样当页面的最小尺寸超过该值时,它仍会完全填充左右两侧的边框,但我似乎找不到样式有效的代码。 I have got the border to display horizontally but I can use set sizes for horizontal orientation.
我有边框可以水平显示,但是我可以将设置尺寸用于水平方向。
Is this possible? 这可能吗? Or does anyone have a better way of accomplishing this type of effect?
还是有人有更好的方法来实现这种效果?
You can use background-repeat: repeat-y;
您可以使用
background-repeat: repeat-y;
in your CSS. 在您的CSS中。 A working demo can be seen here.
可以在此处查看有效的演示。
HTML HTML
<div id="myBG">
</div>
CSS CSS
#myBG {
height: 1000px;
background-image: url('image.jpg');
background-repeat: repeat-y;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.