后台大小在IE中不起作用 [英] background-size not working in IE

查看:74
本文介绍了后台大小在IE中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我检查了另一篇文章.我在IE中使用css3属性background-size时遇到一些问题.

I have checked the other post. I am having some problem in using css3 property background-size in IE.

.topBar {
    width:100%;
    background:url(../siteImages/top_bar.png) repeat-x ;
    background-size:auto 43px;
    height:77px;
}

我知道IE的这段代码.

I know about this code for IE.

filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale');

-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(
src='images/logo.gif',
sizingMethod='scale')";

这将使背景的大小覆盖该区域.

This will make the size of background to cover the area.

推荐答案

background-size是CSS3属性,IE8及更低版本不支持该属性.

background-size is a CSS3 property which isn't supported on IE8 and below.

您也可以尝试以下方法:

You can also try this:

background:url(../siteImages/top_bar.png) 0 0 / auto 43px repeat-x fixed;

这篇关于后台大小在IE中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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