CSS多重背景不工作在IE8 [英] CSS Multiple Backgrounds not working on IE8

查看:103
本文介绍了CSS多重背景不工作在IE8的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下CSS类定义:

I have the following CSS class defined:

.box .login {
    border: 0;
    float: right;
    clear: both;
    height: 48px;
    background: url(../images/submitr.gif) no-repeat right;
    line-height: 20px;
    padding: 12px 42px 16px 23px;
    margin: 8px 22px;
    color: #FFF;
    font-weight: bold;
}

多个背景在Chrome,Firefox,Opera,Safari和IE9。但是,他们不工作在IE8。有人知道为什么是这样吗?

The multiple background are working perfectly on Chrome, Firefox, Opera, Safari, and IE9. However, they're not working on IE8. Does anyone know why that is?

(如果我只有一个背景,它在IE8工作,这是当我开始介绍那些其他背景, 。)

(if I only have one background, it DOES work on IE8. It's when I start introducing those other backgrounds that it starts to flip out.)

感谢您的帮助!我真的很感激它:)

Thanks for the help! I really appreciate it :)

推荐答案

多重背景是CSS3规范。 IE8不明白CSS3,和IE9的事情不明白这一切。要让它在旧的浏览器中工作,您必须将图像合并为一个,或者覆盖多个元素,使它们全部显示在另一个之上。 z-index:是您的朋友: - )

Multiple Backgrounds is a CSS3 specification. IE8 DOES NOT understand CSS3, and IE9 for that matter doesn't understand it all. To get it to work in older browsers you'll have to combine the images into one, or overlay multiple elements to get them all to display on top of one another. z-index: is your friend :-)

这篇关于CSS多重背景不工作在IE8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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