我在哪里使用PIE.htc文件(使IE使用CSS3)当我使用cakephp [英] where do I put the PIE.htc file (for making IE work with CSS3) when I'm using cakephp

查看:148
本文介绍了我在哪里使用PIE.htc文件(使IE使用CSS3)当我使用cakephp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to use PIE.htc, which is a script which hopefully will allow me to use CSS3 features in IE6-8. I'm also using Cakephp (which I'm growing to love)

根据说明,我只是把PIE.htc文件放在任何地方,然后添加行为:url(路径/到/ PIE.htc); 到CSS。所以我有:

According to the instructions I just stick the PIE.htc file anywhere I want to and then add behavior: url(path/to/PIE.htc); to the CSS. So I have:

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);}

我使用的是Cakephp,无论我放在哪里路径和无论我在哪里放置PIE.htc文件我不能使它工作!当我在IE6中查看它时,我的输入仍然没有像在FF中那样可爱的圆角。

I'm using Cakephp and no matter what I put for the path and no matter where I place the PIE.htc file I can't make it work! When I view it in IE6 my inputs still don't have the lovely rounded corners like they do in FF.

推荐答案

绝对路径:

behavior: url(/path/to/PIE.htc);

注意前导正斜杠。这样,无论当前页是什么,到 .htc 文件的路径将保持不变。

Note the leading forward slash. This way, no matter what the current page is, the path to the .htc file will remain the same.

完整网址也可以使用:

behavior: url(//example.com/path/to/PIE.htc);

如果您使用完整的网址,请使用协议相对网址,以便在切换到https时不会收到不安全的内容警告。

If you do use a full url, use a protocol relative url so you don't get insecure content warnings when switching to https.

许多元素需要 position:relative zoom:1 在使用PIE时为了在IE中的行为,您可以检查已知问题页面,然后一直播放,直到您正常工作。

A lot of elements need position:relative or zoom:1 when using PIE in order to behave in IE, make sure you check the known issues page and play around until you get it to work.

这篇关于我在哪里使用PIE.htc文件(使IE使用CSS3)当我使用cakephp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆