【问题标题】:pie.htc not fixing css3 issuespie.htc 没有修复 css3 问题
【发布时间】:2013-02-14 15:06:58
【问题描述】:

我在根目录中有 PIE.HTC,并试图让圆角在 Internet Explorer 中工作

这是我的 CSS

#credits-earned
{
    border-style:solid;
    border-width:2px;
    border-color:#EDEDED;
    width:170px;
    height:60px;
    margin-bottom:10px;
    font-weight: bold;
    border-radius:8px;
    behavior: url (PIE.htc);
}

此尝试生效的 HTML 是:

<div id="credits-earned">
                        You need to earn X<br> more credits today to avoid losing credits
                    </div>

但是圆角在 IE 中不起作用。

感谢您的帮助。

【问题讨论】:

  • 您是否将 PIE.js 文件包含在文件的开头? PIE.htc 也是相对于文件而不是 css
  • 打开一个新标签并转到 your_domain/pie.htc。它会加载文件吗?
  • @EricLemos Lemos CSS3PIE 不需要任何 js 文件 - css3pie.com/documentation/getting-started

标签: html css rounded-corners css3pie


【解决方案1】:

当在外部 css 文件中包含资源时,URL 是相对于 css 文件的。

如果您想包含来自不同目录的内容,您可以使用相对路径(例如 behavior:url('../PIE.htc'))或使用绝对路径(例如 behavior:url('/PIE.htc')

有关样式表中路径的更多信息 - Using relative URL in CSS file, what location is it relative to?

【讨论】:

    【解决方案2】:

    除了 pie.htc 工作的正确路径之外,给:

     #credits-earned
     { position: relative;
     }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-18
      相关资源
      最近更新 更多