没有出现在IE8上的背景图像 [英] Background image not showing up on IE8

查看:90
本文介绍了没有出现在IE8上的背景图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读其他问题,但无济于事 - 我真的无法解决这个问题。

I've read through other questions but to no avail - I really can't work this out.

该网站是(经过重新设计,所以不是相关的。它使用HTML5元素,但它们没有被声明为块,并且IE不假设它们应该是。)

The site is (Been redesigned, so isn't relevant anymore. It used HTML5 elements, but they weren't declared as block, and IE doesn't assume that they should be.)

页脚上的渐变看起来很好的非IE浏览器,但无法在IE 7,8和IE9开发预览中显示。

The gradient on the footer looks great in non IE browsers, but fails to show in IE 7,8 and the IE9 dev preview.

任何想法?

推荐答案

您可以尝试将此添加到页脚CSS(除了现有的页脚样式)。

You could try adding this to your footer CSS (in addition to your existing footer styles).

footer
{    
    display:block;
}

这在FF3.6下为我修好了,我假设将在IE中修复它 - < footer> 的默认显示样式是内联哪个不好看与浏览器无关的背景。对它应用块将更像是一个div。

This fixed it for me under FF3.6, and I'm assuming will fix it in IE as well - The default display style for <footer> is inline which doesn't play nice with backgrounds regardless of browser. Applying block to it will treat it more like a div.

您还需要小心使用HTML 5.不确定它的支持程度如何在所有浏览器中。您可能需要考虑< div id =footer><! - 页脚内容 - >< / div> 并将样式应用于它用CSS代替..

You'll also want to be careful with your use of HTML 5. Not sure of how well supported it is in all browsers. You might want to consider <div id="footer"><!-- contents of footer --></div> and applying styles to it by id in CSS instead..

这篇关于没有出现在IE8上的背景图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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