本文介绍了IE 8:background-size修复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已尝试在IE中添加背景尺寸,但它不起作用:

I've tried to add background size to IE but it's not working at all:

HTML

<h2 id="news">Notícias <img src="white-marker.png" alt="" /></h2>

CSS:

div#content h2#news {
    background: url('../images/news-background.jpg') no-repeat;
    background-size: 100%;
    border-radius: 20px;
    color: #fff;
    margin: 20px 0 0 20px;
    padding: 8px 20px;
    width: 90%;
    -moz-background-size: 100%;
    -moz-border-radius: 20px;
    -webkit-background-size: 100%;
    -webkit-border-radius: 20px;
}

推荐答案

由'Dan'在类似的线程发布,如果你不使用sprite,可能有一个修复:

As posted by 'Dan' in a similar thread, there is a possible fix if you're not using a sprite:

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

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



注意
过滤器有缺陷,分配区域内的任何链接都不再可点击。

Caution
The filter has a flaw, any links inside the allocated area are no longer clickable.

这篇关于IE 8:background-size修复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-18 11:53
查看更多