【发布时间】:2013-02-19 16:21:36
【问题描述】:
在IE8中,当div高于window时,-ms-filter背景消失。在 IE7 及以下工作正常。 (我可以使用1px的透明图片,但是如果我需要使用透明色加背景图片呢)
示例代码和小提琴:
<!DOCTYPE html>
<html lang="sk">
<head>
<meta charset="utf-8">
<style>
html,body{height:100%;margin:0;padding:0;}
#one{
float:left;
height:100%;
width:50%;
background:rgba(0,0,0,0.5);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#CC917C6F,endColorstr=#CC917C6F)";
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#CC917C6F,endColorstr=#CC917C6F);
}
#two{
float:right;
height:101%;
width:50%;
background:rgba(255,0,0,0.5);
-ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#CCAAAA6F,endColorstr=#CCAAAA6F)";
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#CCAAAA6F,endColorstr=#CCAAAA6F);
}
</style>
</head>
<body>
<div id="one"></div>
<div id="two"></div>
</body>
</html>
【问题讨论】:
标签: html css internet-explorer-8 background gradient