css - 在 Internet Explorer 9 中使用 -ms-filter

标签 css asp.net internet-explorer

我正在使用 visual studio 2008 构建 Web 应用程序。css 版本是 2.1,我的 Internet Explorer 版本是 ie9。css 2.1 版本不透明度属性不存在,所以我正在使用 -ms-filter 使我的代码在 ie9 中工作。这是我的代码

.wait
{
    position: absolute;
    height: 100%;
    width: 100%;
    display: none;
    z-index: 0;
    background-color: #E1FFFF;
    text-align: center;
    cursor:wait;
    opacity:0.5;
    -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
}

但它不起作用。请帮助我。

最佳答案

试试这个。

如果您希望不透明度在所有 IE 版本中工作,顺序应该是:

-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; // first!
filter: alpha(opacity=50);                  // second!

Reffer Notes

关于css - 在 Internet Explorer 9 中使用 -ms-filter,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29249281/

相关文章:

html - 如何应用CSS位置:absolute correctly?

jquery - 图像轮播在 body 上坍塌

asp.net - 从 Azure 网站访问文件共享

asp.net - 从 DAL 返回什么到 BLL

javascript - 使用 angularjs 设置下拉列表的默认值?

css 文本装饰 none 在 chrome 中不起作用

javascript - 中心 Javascript 弹出到屏幕

javascript - JavaScript 怪异模式和标准模式之间的区别

c# - 隐藏字段值不在 IE 中呈现

internet-explorer - IE9、IE8、SVG、VML 和文档类型