一、图片作为背景图片,大小自适应:
<td style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://www.google.com/images/nav_logo4.png', sizingMethod='scale'">
二、例子:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>css实现背景图片自适应大小</title>
</head>
<body>
<table width="200">
<tr> <td style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://www.google.com/images/nav_logo4.png', sizingMethod='scale'">
<p>背景图片自适应大小</p>
<p> </p>
<p> </p>
<p> </p></td> </tr> </table>
<p>图片原始大小<img src="http://www.google.com/images/nav_logo4.png" /></p>
</body>
</html>