当我使用cakephp时,我在哪里放置PIE.htc文件(使IE使用CSS3)

jul*_*lia 12 css internet-explorer css3 css3pie

我正在尝试使用PIE.htc,这是一个希望允许我在IE6-8中使用CSS3功能的脚本.我也在使用Cakephp(我越来越喜欢)

根据说明,我只需将PIE.htc文件粘贴到我想要的任何位置,然后添加behavior: url(path/to/PIE.htc);到CSS中.所以我有:

input[type=text]{
    width:348px;
    height:30px;
    border:1px solid #ddd;
    padding:3px;
    background:url(../img/formfieldbg.gif) repeat-x;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    border-radius: 5px;
    vertical-align:top;
    behavior: url(path/to/PIE.htc);}
Run Code Online (Sandbox Code Playgroud)

它还说:注意:此路径与正在查看的HTML文件相关,而不是从中调用的CSS文件.

我正在使用Cakephp,无论我为路径放置什么,无论我在哪里放置PIE.htc文件,我都无法使其工作!当我在IE6中查看它时,我的输入仍然没有像在FF中那样可爱的圆角.

Wes*_*rch 14

尝试使用绝对路径:

behavior: url(/path/to/PIE.htc);
Run Code Online (Sandbox Code Playgroud)

注意前导斜线.这样,无论当前页面是什么,.htc文件的路径都将保持不变.

完整的URL也可以使用:

behavior: url(//example.com/path/to/PIE.htc);
Run Code Online (Sandbox Code Playgroud)

如果您确实使用了完整的URL,请使用协议相对URL,以便在切换到https时不会收到不安全的内容警告.

许多元素需要position:relativezoom:1在使用PIE时才能在IE中运行,请确保检查已知问题页面并进行操作,直到您开始工作.