CSS3 PIE不适用于IE8或更低版本

时间:2014-01-24 13:41:54

标签: css3pie

没有弯曲的边框。 IE9及以上版本工作正常。

http://cscsu.org.uk/WiltshireMedicinesManagement/csu.htm是我所拥有的非常精简的版本

<!DOCTYPE html>
<html lang="en-US">
<head>
<style type="text/css">

.wpdm-metro {
behavior:url(/border-radius.htc);
-moz-border-radius:8px;
-webkit-border-radius:8px;
-khtml-border-radius:8px;
border-radius:8px;
margin-bottom:2px;

margin: 0 5px 7px 0; 
height:120px; 
width:45%; 
background:#66cc33 !important; 
color:white !important;
}
</style>
</head>

<body>
<div class="wpdm-metro">
</div> 
</body>
</html>

我做了什么明显错误的事吗?文件存在(border-radius.htc),我甚至将AddType text/x-component .htc添加到.htacccess

1 个答案:

答案 0 :(得分:1)

无论出于何种原因,除非您从!important规则中删除background,否则PIE将无效。

虽然我在documentation中没有看到这个,但在面对几乎相同的问题时,它对我有用。

.wpdm-metro {
    behavior:url(/border-radius.htc);
   -moz-border-radius:8px;
   -webkit-border-radius:8px;
   -khtml-border-radius:8px;
    border-radius:8px;
    margin: 0 5px 7px 0; 
    height:120px; 
    width:45%; 
    background:#66cc33; 
    color:white;
}
相关问题