Ask a question about css_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:08:14
Original
1103 people have browsed it

There is a td in the interface. In the td, I want to add a background image. However, the height of the td is fixed but the width is not fixed. How can I make the picture adapt to the width of the td?


Reply to discussion (solution)

The background can only be tiled

Is there an example?

background: url("img/bg.jpg") repeat-x;

The background image is particularly ugly if it is tiled. Is there no way to stretch it?

There is no good way

I realized it using css filter

<td height="150"  style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../images/culture.gif', sizingMethod='scale'">						测试文字					</td>
Copy after login



Thank you too

It works on IE, but not on Firefox

Related labels:
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