IE完整背景图片 [英] IE full background image

查看:104
本文介绍了IE完整背景图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我正在尝试使用完整的背景图片创建一个div,它在大多数浏览器中都可以使用以下方法正常工作:

background-size: 100% 100%;


但不是IE6,IE7,IE8.
我想知道如何做到这一点,并且如果可能的话,仅使用css? microsoft.com/en-us/library/cc351024%28v=vs.85%29.aspx#color>此处 [ http://www.w3.org/TR/CSS2/colors.html [^ ].

祝你好运,

-SA


这可以解决您的问题: ^ ]-甚至可以处理IE 6

最好的问候
Espen Harlinn


hi i am trying to create a div with a full background image its working fine in most of the browsers using:

background-size: 100% 100%;


but not IE6,IE7,IE8.
i am wondering how to do it,and if possible using css only?

解决方案

The css information for this is available here[^]. Note that IE tends to require custom css at times.


According the compatibility data referenced by Marcus, background-size is not processed properly in the browsers you list.

I don''t think you can do anything about it. Not supported means not supported. I would recommend to slightly change design to avoid this style. Why?

The style background-size: 100% 100%; cannot be perfect anyway. Here is why: the causes stretch of the background image, which cause re-sampling. There are problems with any re-sampling in principle: the quality of image depends on the rendered size of the block element (or window) and can cause most ugly pixellation as the stretch grows. Even rendering performance could suffer. Again, you cannot fix compatibility unless you force custom CSS for different browser, which is also a problem.

Therefore I would recommend using background-repeat styles to tile your image. See, for example: http://www.w3.org/TR/CSS2/colors.html[^].

Good luck,
—SA


This may solve your problem: How Do you Stretch a Background Image in a Web Page[^] - even handles IE 6

Best regards
Espen Harlinn


这篇关于IE完整背景图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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