【发布时间】:2010-08-19 13:16:37
【问题描述】:
我正在尝试使用 CSS3 PIE 附加行为在 IE 中制作圆角。
这是我的 CSS:
.fieldRow {
clear:both;
padding: 0;
margin: 0;
overflow: hidden;
line-height:17px;
}
.alternate, .rowMousedOver {
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
behavior: url(PIE.php);
position: relative;
}
.rowMousedOver{
background-color: #E2E66D !important;
}
.alternate {
background-color: #FCFEE8;
}
这里是一些示例 HTML:
<div class="fieldRow alternate">
<div class="label"><label id="title_label" for="title"> Title: </label></div>
<div class="fieldWrapper required text">
<div class="cellValue"><input type="text" onchange="validateField(this)" name="title" id="title" value="Tax Free Savings Accounts" disabled=""></div>
</div>
</div>
当它悬停时,我通过 javascript 添加 rowMousedOver 到 fieldRow。
知道为什么这不起作用吗?我也尝试过使用behavior: url(PIE.htc),但也没有成功。
谢谢!
【问题讨论】:
-
它可以在 Firefox 和 chrome 上运行吗?
-
可能是路径的问题。因为 htc 是 MS 标准,所以 url 路径是相对于文档而不是样式表的。您始终可以先尝试使用绝对 URL。
-
cordesmj 也建议这样做,但我把它放在正确的位置,它仍然没有四舍五入。
-
z-index 不适用于相对位置...仅适用于绝对位置 ;)
标签: internet-explorer css