2014-10-30 48 views
0

我有一个td,我想背景图像是100%不重复。td背景图片100%不工作在ie 8(数字)

下面的代码适用于所有情况,但ie8 + - 。因为我在xp pro服务器上运行,所以不知道ie10。

.td1 { 
    background-repeat: no-repeat; 
    background-size: cover; 

    } 

    <td class="td1" style="max-height: 100%; max-width: 100%" background="../art1/#bg1mg#.jpg" align="center"> 

随着图像变化td标签中的变量“bg1mg”我无法在样式部分中输入图像url。

tnx提前。

回答

0

IE8不支持background-size

http://caniuse.com/#feat=background-img-opts

提示:你也不宜与CSS混合HTML。将你的内容与你的造型分开。维护起来很容易,并且可以帮助您避免许多麻烦。

+0

tnx努诺。认为可能有一种解决方法... – Andy 2014-10-30 03:39:34

+0

就混合标签中的类和样式而言,当你有一个类描述时经常需要它,但是每个输入需要不同的宽度,并且“尺寸”标签不够精确用于跨浏览器问题进行微调。 – Andy 2014-10-30 03:48:49