【问题标题】:CSS Pie not working with correct path to fileCSS Pie 无法使用正确的文件路径
【发布时间】:2013-02-03 18:53:00
【问题描述】:

我正在尝试在我的网站中使用 CSS PIE,但由于某种原因它无法正常工作。

我的文件夹结构如下:

我的 CSS 是这样的:

.region-sidebar-first-inner .block-menu-block-1 {
  background: #730868;
  margin-bottom: 70px;
  background: -webkit-gradient(linear, 0 0, 0 bottom, from(#730868), to(#0a9f9d));
  background: -webkit-linear-gradient(top, #730868 0%, #0e70a2 76%,#0a9f9d 100%);
  background: -moz-linear-gradient(top, #730868 0%, #0e70a2 76%,#0a9f9d 100%);
  background: -ms-linear-gradient(top, #730868 0%, #0e70a2 76%,#0a9f9d 100%);
  background: -o-linear-gradient(top, #730868 0%, #0e70a2 76%,#0a9f9d 100%);
  background: linear-gradient(top, #730868 0%, #0e70a2 76%,#0a9f9d 100%);
  -pie-background: linear-gradient(top, #730868 0%, #0e70a2 76%,#0a9f9d 100%);
  behavior: url(pie/PIE.htc);
}

当我在 Chrome 中检查我的PIE.htc-文件时,该路径链接到正确的文件,因此它是有效路径。

虽然 CSS Pie 警告我关于 Note: this path is relative to the HTML file being viewed, not the CSS file it is called from,但这对我也不起作用......所以肯定有其他问题,我不知道是什么。

【问题讨论】:

    标签: css3pie


    【解决方案1】:

    behavior: url(...); 中的路径必须相对于您使用该样式的 HTML 文件,而不是相对于 CSS 文件!

    【讨论】:

      【解决方案2】:

      您必须从包含 CSS 文件的文件(您所在的 CSS使用 PIE)。

      我的工作情况: 行为:url(funkce/PIE.php);

      树(此文件/文件夹在同一级别):
      字体(文件夹)
      funkce(文件夹)
      img(文件夹)
      模板(文件夹)
      slash_something.php(文件)

      在模板文件夹中,我有文件夹 css,其中有使用 PIE 的 CSS 文件。我在文件夹“funkce”中的 PIE.php 文件。 => 我必须链接“funkce/PIE.php” => 在你的情况下 - 行为提示:url(css/pie/PIE.htc);

      【讨论】:

        猜你喜欢
        • 2015-05-11
        • 1970-01-01
        • 1970-01-01
        • 2019-07-24
        • 2021-08-13
        • 2019-01-19
        • 1970-01-01
        • 1970-01-01
        • 2016-04-23
        相关资源
        最近更新 更多