IE 10或IIS6无法使用box.shadow

时间:2013-09-10 00:39:54

标签: html css iis-6 internet-explorer-10

我在让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>

2 个答案:

答案 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)";

请查看以下相关链接:

-ms-filter property

Microsoft CSS Vendor Extensions

相关问题