Html css 背景重复 x 和 y
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9962840/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
css background-repeat x and y
提问by israel love php
Is it possible to use with small picture for the background div to repeat x and y together? See example thanks.
是否可以使用小图片作为背景 div 一起重复 x 和 y? 请参阅示例谢谢。
回答by MarcinJuraszek
background-repeat: repeat;
http://www.w3schools.com/cssref/pr_background-repeat.asp:
http://www.w3schools.com/cssref/pr_background-repeat.asp:
repeat - The background image will be repeated both vertically and horizontally. This is default
重复 - 背景图像将在垂直和水平方向重复。这是默认的
Example: http://jsfiddle.net/p2vjf/6/
回答by Guffa
Yes, just remove both, and the default value background-repeat: repeat;
kicks in:
是的,只需删除两者,默认值就会background-repeat: repeat;
生效:
回答by Paz
use this....
用这个....
float: left;
width: 100%;
background: url(../images/img01.jpg) left top repeat;
height: 500px; //set the height to which you want to repeat