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.
我正在尝试使用css3 PIE.htc文件在IE上制作漂亮的圆角。 p>
我已经阅读了这个网站上与之相关的所有帖子并尝试了所有不同的路径组合,我现在还在文件夹中加载了PIE文件,但无论我看起来怎么样都看不出来 让它在IE8上运行。 p>
我正在使用虚拟机查看我的本地主机上的站点(或我的虚拟机调用它时为169.254.107.215) ,这是我正在尝试的代码: - 我认为这与htc文件相对于html(而不是css文件)的需求有关,就像我说的,我尝试了很多不同的组合 p>
.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:250p x;
position:relative;
behavior:url(PIE.htc);
}
&lt; div class =“rounded”&gt; stuff stuff stuff&lt; / div&gt;
code> pre>
我做错了什么? 请帮助我:( p>
编辑:我已经尝试创建一个单页网站进行测试,我可以让它工作正常所以它一定是一个问题,在哪里放htc 文件。我随便把它放在我能想到的地方。 p>
div>
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/