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 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题