我在让box-shadow
工作时遇到问题。我运行了一个非常简单的程序,它产生div
box-shadow
,它使用Firefox和IE10显示正常运行XAMPP但是当使用IIS6时,firefox工作而IE10没有。
<!DOCTYPE html>
<html>
<head>
<style>
div
{
width:300px;
height:100px;
background-color:yellow;
box-shadow: 10px 10px 5px #888888;
}
</style>
</head>
<body>
<div>allo</div>
</body>
</html>
答案 0 :(得分:0)
IE可能没有使用IE10模式,您可以使用开发者工具查看(按F12)。
如果没有,最简单的解决方法是在head
内添加:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
答案 1 :(得分:-1)
您可以将-ms-filter
添加到CSS中。
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=5, Direction=140, Color=#444444, positive=true)";
请查看以下相关链接: