无法让CSS3Pie工作 [英] Can't get CSS3Pie to work

查看:133
本文介绍了无法让CSS3Pie工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我觉得很愚蠢,就像我错过了一些非常明显的东西,但我已经检查了一堆,无法弄清楚出了什么问题。我正在尝试使用CSS3pie在ie8中制作圆角,但它不会采取。

I feel so stupid, like I'm missing something really obvious but I have checked everything a bunch and can't figure out what's wrong. I'm trying to use CSS3pie to make rounded corners in ie8, but it just won't take.

我有相对于html文档设置的路径,而不是css。它位于一个名为pie的文件夹中,所以这就是我在CSS中使用的内容:

I have the path set up relative to the html document, not the css. It's in a folder called pie, so this is what i'm using in the CSS:

#recommended-acc {
float: left;
width: 472px;
background: url(../img/cont_bg.png) repeat;
margin: 10px;
padding: 0 10px 6px 0;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
behavior: url(pie/PIE.htc);
border-radius: 5px;
border: 1px #d8d8d8 solid;
 }

有谁知道更多关于css3馅饼的人可能会告诉我我的意思我不见了?我已经在很多不同的元素上尝试了它并且它没有工作过一次。

Does anyone know more about css3 pie who could maybe advise me on what I'm missing? I've tried it on a ton of different elements and it hasn't worked once.

推荐答案

要尝试的一些事情:


  • 在路径中使用前导斜杠:

  • Use a leading forward slash in your path:

behavior: url(/pie/PIE.htc);

如果您在包含多个URI段的页面上,这将确保路径正确,例如 http://example.com/pages/archives/mypage.html 。如果没有前导斜杠,它将来自 mypage.html ,而不是根目录(它应该是)。

This will make sure the path is correct in case you are on a page with more than one URI segment, like http://example.com/pages/archives/mypage.html. WIthout the leading forward slash, it would be relative from mypage.html and not the root directory (which it should be).

尝试强制 hasLayout (隐藏IE浏览器的事情)通过向元素添加 position:relative; zoom:1 。这通常是问题,HTC文件被正确引用但没有它就不适用。

Try to force hasLayout (obscure IE thing) by adding position:relative; or zoom:1 to the element. This is often the issue, the HTC file is referenced correctly but the styles won't apply without it.

阅读已知问题页面,请确保您没有遇到任何其他常见问题问题。

Read the known issues page carefully and make sure you aren't experiencing any of the other multitude of common problems.

这篇关于无法让CSS3Pie工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆