【问题标题】:CSS3 Pie integration with Wordpress in ie8 does not workie8 中 CSS3 Pie 与 Wordpress 的集成不起作用
【发布时间】:2012-10-05 09:47:45
【问题描述】:

使用border-radius 我正在创建圆来支持border-radius 我正在使用CSS3 pie 然后在ie 中它也不起作用。
我将 CSS3 pie 文件放在我的主题文件夹中并在style.css 中编写代码:

#sidebar {
 width:140px;
 height:140px;
 margin:0 auto;
 -moz-border-radius: 70px;
 -webkit-border-radius: 70px;
 border-radius: 70px;
 behavior: url(PIE.htc);
 background-color:#fff;
 position:relative;
 z-index: 0;
}

【问题讨论】:

标签: html wordpress css css3pie


【解决方案1】:

让 pie 的 URL 成为绝对的不是最简单的 hack;

#sidebar {
 width:140px;
 height:140px;
 margin:0 auto;
 -moz-border-radius: 70px;
 -webkit-border-radius: 70px;
 border-radius: 70px;
 behavior: url(http://yoursite.com/wp-content/themes/themename/css/PIE.htc);
 background-color:#fff;
 position:relative;
 z-index: 0;
}

我不得不在一个永远无法使用相对路径的恼人安装中这样做。

【讨论】:

    【解决方案2】:

    .htc 文件的路径需要相对于站点的根目录。

    CSS 路径是相对于样式表的。微软又是害虫了。

    将 PIE.htc 文件移动到您网站的根目录,这应该可以工作。

    【讨论】:

    • 我在我的主题文件夹中创建了 pie 文件夹并将所有 css3 pie 文件放在该文件夹中。样式表如下:- #sidebar ul li {border-radius:70px; -moz-边界半径:70px;行为:url("localhost/travel_logs/blog/wp-content/themes/travel_logs/pie/…);位置:相对;缩放:1;}
    • 是的,不要。将 .htc 文件放在根目录中。路径必须相对于根。不是样式表。
    • 对不起,但我这样做了它也不起作用。在简单的 html 网站中它可以工作,但在 wordpress 中它不起作用。
    • 好的,.htc 文件位于根目录下。 CSS 是否仍指向 (PIE.htc)?
    • 这应该可以解决问题。没有看到该站点,该站点过于本地化,无法提供适当的帮助。对不起。
    【解决方案3】:

    您需要将 pie.htc 放在根目录中。像 www.domainname.com/PIE.htc 这样的东西,或者如果你在本地机器上开发,那么 http://localhost/[your installation folder]/PIE.htc

    希望这会有所帮助!

    【讨论】:

    • 对不起,但这对我没有帮助,因为我已经这样做了,它在 ie 中不起作用。
    猜你喜欢
    • 2012-04-02
    • 2012-09-29
    • 1970-01-01
    • 1970-01-01
    • 2012-05-14
    • 1970-01-01
    • 2012-09-16
    • 2011-06-07
    • 1970-01-01
    相关资源
    最近更新 更多