Home >Web Front-end >HTML Tutorial >How to make the background image adapt to the size of the table in css_html/css_WEB-ITnose

How to make the background image adapt to the size of the table in css_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:05:172852browse

As mentioned, I tried the following code
.background {
background-image: url(../images/man/NULL-1.jpg);
background-repeat: repeat;
background-position: 100% 100%;
}


Not done


Reply to discussion (solution)

background-image: url(../images/man/NULL-1.jpg); Set the background to the image
background-repeat: repeat; Whether the background image is repeated
background-position: 100% 100 %; Background image positioning

Of course you cannot achieve the effect you want if you write it this way

If what you want is to tile the background from the lower right corner, there is no problem if you write it this way.















I want the background image in the table to adapt to the size of the table instead of the entire page background. Experts have Method?

It seems that the size of the background image can only be defined in CSS3. It could not be defined in the previous CSS specifications

css3 can do this background-size:100%
However, lower version browsers do not support it. Such as ie6, 7, 8

It seems that it can’t be done, haha ​​

Statement:
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