第一次写博客,写一下今天遇到的问题吧
今天在做页面透明度的时候,用IE7进行测试,发现没有效果,原代码如下
.mask { width: 100%; height: 100%; position: fixed; left: 0; top: 0; background: rgba(0,0,0,.2); display: none; }
这种情况下发现不兼容,改用另一种写法,设定一个background,再设置opacity属性为0.4,发现还是不行,问了老师才知道要加一行实现IE6、7、8的兼容性
更改后代码如下:
.mask { width: 100%; height: 100%; position: fixed; left: 0; top: 0; background-color: #000; opacity: 0.2; filter: alpha(opacity = 20);/* 兼容IE6、7、8 */ display: none; }
这样在IE上就能完美兼容了。
以上就是如何结局关于IE 6、7、8中透明度的兼容问题的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号