Home > Web Front-end > HTML Tutorial > CSS如何设置背景图片水平重复和垂直重复_html/css_WEB-ITnose

CSS如何设置背景图片水平重复和垂直重复_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:37:31
Original
3158 people have browsed it

CSS如何设置背景图片水平重复和垂直重复:

设置背景图片的水平平铺或者垂直平铺非常的简单,使用两端代码就可以了,代码如下:

background:url("photo.gif") repeat-y;
Copy after login

以上代码可以让背景图片在垂直方向上平铺。

background:url("photo.gif") repeat-x;
Copy after login

以上代码可以让背景图片在水平方向上平铺。

非常的简单,具体可以参阅以下两篇文章:

1.background-repeat属性可以参阅CSS的background-repeat属性一章节。

2.background属性可以参阅CSS的background属性一章节。

原文地址是:http://www.51texiao.cn/div_cssjiaocheng/2015/0606/3426.html

最为原始地址是:http://www.softwhy.com/forum.php?mod=viewthread&tid=9657

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template