简体   繁体   English

css background-repeat x和y

[英]css background-repeat x and y

Is it possible to use with small picture for the background div to repeat x and y together? 是否可以使用小图片为背景div重复x和y? See example thanks. 见示例谢谢。

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. repeat - 背景图像将垂直和水平重复。 This is default 这是默认值

Example: http://jsfiddle.net/p2vjf/6/ 示例: http//jsfiddle.net/p2vjf/6/

Yes, just remove both, and the default value background-repeat: repeat; 是的,只需删除两者,默认值为background-repeat: repeat; kicks in: 踢:

http://jsfiddle.net/Guffa/p2vjf/7/ http://jsfiddle.net/Guffa/p2vjf/7/

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM