【问题标题】:PIE.htc - location is correct but still no CSS3 effects in IEPIE.htc - 位置正确但在 IE 中仍然没有 CSS3 效果
【发布时间】:2013-06-26 00:32:26
【问题描述】:

我有一个 div.outer 来包装我的内容,并且有一个渐变背景。我能够看到 PIE.htc 正在加载(它在 index.html 所在的根目录中),但是没有发生 CSS3 效果。

.outer{
    height: 100%;
    position: relative;
    z-index: 0;
      background: #063A5F; /*fallback for non-CSS3 browsers*/
      background: -webkit-gradient(linear, 0 0, 0 100%, from(#063A5F) to(#063A5F)); /*old webkit*/
      background: -webkit-linear-gradient(top, #4189CC, #063A5F); /*newer webkit*/
      background: -moz-linear-gradient(top, #4189CC, #063A5F); /*old gecko*/
      background: -o-linear-gradient(top, #4189CC, #063A5F); /*opera 11.10+*/
    background: linear-gradient(to bottom, #063A5F, #4189CC);
   -pie-background: linear-gradient(to bottom, #063A5F, #4189CC); /*ie 6-9 via PIE*/
    behavior: url(PIE.htc);

}

当前站点是available here

我已经尝试过 z-index 问题,但也许我做错了 :)

我还遇到了边界半径未应用于我的锚标记的问题。

.btn{
    border-radius: 5px 5px 5px 5px;
    behavior: url(PIE.htc);
}

非常感谢任何帮助!

【问题讨论】:

    标签: internet-explorer css css3pie


    【解决方案1】:

    尝试将 PIE.htc 上传到您的根目录和/或在您的 CSS 中包含文件的绝对 URL。

    所以如果你把它放在你的根目录中,那么 CSS 会是这样的:

    .btn{
        border-radius: 5px 5px 5px 5px;
        behavior: url("http://yourdomain.com/PIE.htc");
    }
    

    希望有帮助!

    那样,PIE 有点恶心。

    【讨论】:

    • 我做了这个调整,不幸的是在 IE 中仍然没有 CSS3 的优点。我确实将在 IE 的开发工具中注册的地址复制并粘贴到一个新窗口中。 linkdemonstrated here[/link] 确实是正确的。谢谢你的建议,辛西娅。
    【解决方案2】:

    通过在 .htaccess 中添加两行来解决问题:

    RewriteRule /PIE.htc$ PIE.htc [L]
    AddType text/x-component .htc
    

    查看文件后,我很快注意到 (joomla) 网站正在使用 mod 重写。许多 joomla 站点利用生成搜索引擎友好 (SEF) URL 的插件。我只是将以上两行添加到我的 .htaccess 文件的底部并清除了我的缓存 - 问题解决了。

    【讨论】:

      猜你喜欢
      • 2013-10-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-30
      • 1970-01-01
      相关资源
      最近更新 更多