Home  >  Article  >  Web Front-end  >  Ask a question about css_html/css_WEB-ITnose

Ask a question about css_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:08:141094browse

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>



Thank you too

It works on IE, but not on Firefox

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