如何仅为8和其他浏览器拉伸图像为td? [英] How to stretch image for td only for ie 8 and other browsers also ?

查看:84
本文介绍了如何仅为8和其他浏览器拉伸图像为td?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每一个人都是Hai,

i在拉伸html表格中有另一个问题td标签背景图片stretch.i需要拉伸宽度为100%,高度为71px的td背景图片。

i有以下代码用于使用CSS的streach图像

 tdbg  
{
background-size 100%71px;
background-image url(' images / img_Header03.png');
background 无重复中心固定;
过滤器 progid:DXImageTransform.Microsoft.AlphaImageLoader(src ='images / img_Header03.png',sizingMethod ='scale');
}





i需要拉伸图像的宽度,而不是高度为71px固定没有必要改变。怎么样?

请尽快回复。



注意:我需要拉伸图像的宽度而不是高度,bcz图像高度小于td高度,所以我需要在底部有一些空间,bcz我使用垂直对齐作为顶部。



问候

Aravind。

解决方案

你好Aravind,



根据我的理解,你想要这个效果:

 #tdbg 
{
background-image:url('paper.gif');
background-repeat:no-repeat;
background-size:100%71px;
}





将此代码与您的图片一起使用以查看它是否有效。我可以不这样做,请解释你得到了什么结果。

另外,看看 w3schools_CSS


Hai every one,
i have a another problem in stretch html table td tag background image stretch.i need to stretch td background image with 100% width and 71px height.
i have following code for streach image using css

#tdbg 
{
      background-size: 100% 71px;
      background-image: url('images/img_Header03.png');
      background: no-repeat center center fixed;
      filter: progid:DXImageTransform.Microsoft.AlphaImageLoader( src='images/img_Header03.png', sizingMethod='scale');
}



i need to stretch width of the image only not for height 71px fixed no need to change.How ?
pls reply asap.

Note: i need to stretch width of the image only not for height ,bcz the image height is less than td height ,so i need some space at the bottom,bcz i use vertical align as top.

Regards
Aravind.

解决方案

Hello Aravind,

From what I understood, you want this effect:

#tdbg 
{
    background-image:url('paper.gif');
    background-repeat:no-repeat;
    background-size: 100% 71px;
}



Use this code with your image to see if it works. I can it doesn't, please explain what results are you getting.
Also, have a look at w3schools_CSS


这篇关于如何仅为8和其他浏览器拉伸图像为td?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆