Home > Article > Web Front-end > Ask a question about css_html/css_WEB-ITnose
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?
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>
It works on IE, but not on Firefox