给予IE边界半径支持不工作

给予IE边界半径支持不工作

本文介绍了CSS3 PIE - 给予IE边界半径支持不工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在IE中使用附加行为制作圆角。

I am trying to make rounded corners in IE with the CSS3 PIE attached behavior.

这是我的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示例:

and here is some sample 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

and via javascript I add rowMousedOver to the fieldRow when it is hovered.

有什么想法为什么这不工作?我也尝试使用 behavior:url(PIE.htc),但没有运气。

Any idea as to why this is not working? I've also tried using behavior: url(PIE.htc), but had no luck with that either.

谢谢!

推荐答案

PIE.htc请求应该使用MIME类型text / x-component不触摸的行为。你使用的PIE.php应该解决这个问题。如果不确定是否是这种情况,请使用FireBug的Net功能检查对文件的直接请求。

The PIE.htc requests should respond with the mime type "text/x-component" - or IE won't touch the behaviour. The PIE.php you use should fix this. If you are not sure if this is the case, use FireBug's Net feature to check a direct request to the file.

另请注意,PIE.htc的路径相对于HTML页面 - 不是相对于您期望的css文件。所以考虑使用.htc绝对路径。这里FireBug可以帮助你再次检测是否有404问题。

Also note that the path to PIE.htc is relative TO THE HTML PAGE - not relative to the css file which you would expect. So consider making the path to the .htc absolute. Here FireBug can help you again to detect if you have a 404 issue.

这篇关于CSS3 PIE - 给予IE边界半径支持不工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-05 22:17