max width标签不适用于IE

时间:2013-05-01 12:30:34

标签: html css internet-explorer

我在CSS中使用以下代码段:

img {  
  /* Responsive images (ensure images don't scale beyond their parents) */

  max-width: 100%;
  /* Part 1: Set a maxium relative to the parent */

  width: auto\9;
  /* IE7-8 need help adjusting responsive images */

  height: auto;
  /* Part 2: Scale the height according to the width, otherwise you get stretching */

  vertical-align: middle;
  border: 0;
  -ms-interpolation-mode: bicubic;
}

但是,max-width不适用于IE,图像会放大。任何修复/解决方案?

1 个答案:

答案 0 :(得分:0)

试试这个:

width: inherit;

应修复任何IE问题。