dongque1958 2012-09-04 13:53
浏览 101
已采纳

PIE.htc位置 - 我怎么知道html的相对路径在哪里 - zencart

I'm trying to use the css3 PIE.htc file for making nice rounded corners on IE.

I've read all the posts on this site relating to it and tried all diferrent combinations of path and I've also nowgot the PIE file in loads of folders but no-matter what I can't seem to get it to get it to work on IE8.

I'm using a virtual machine to view the site which is on my localhost (or 169.254.107.215 as my virtual machine calls it), here's the code I'm trying: - I think it has to do with the need for the htc file to be relative to the html (rather than the css file), like I say, I've tried many different combos

.rounded {
border: 1px solid #ccc;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
-moz-box-shadow: 2px 2px 3px #666;
-webkit-box-shadow: 2px 2px 3px #666;
box-shadow: 2px 2px 3px #666;
font-size: 20px;
padding: 4px 7px;
outline: 0;
-webkit-appearance: none;
width:250px;
position: relative;
behavior: url(PIE.htc);
}

<div class="rounded">stuff stuff stuff</div>

What am I doing wrong? Please help me :(

EDIT: I've tried creating a sinple one page website to test and I can get it to work alright so it must be a problem of where to put the htc file. I litterally have it everywhere I can think to put it.

  • 写回答

1条回答 默认 最新

  • dousheng3364 2012-09-10 02:58
    关注

    The htc file should be relative to your HTML file. NOT your CSS file.

    I normally put it in the root directory. You may need to put a / infront of the path in your CSS file. So it would be /PIE.htc

    If you need help finding or making sure your file is in the proper directory. Check out this useful tutorial.

    http://www.htaccesstools.com/articles/full-path-to-file-using-php/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog