我想通过使用http://css3pie.com在IE中使用变通方法来获得圆角。我已经在我的css中包含了以下内容,当页面加载时会加载。所有这些都在Joomla 1.5中加载。CSS3PIE在IE中不工作
.form_field {color:#222 !important; border:2px solid #333; background:#f4f4f4;-webkit- border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px; color:#fff; padding:2px 0px 2px 0px; position:relative; z-index:99999;
behavior: url(./PIE.htc);
上述代码保存在一个名为template.css的css文件中。
PIE.htc和PIE.php位于我的网站的根目录。
下面是在IE 9中加载页面时生成的一些“查看源”,其中呈现选择为IE 8呈现模式。
<link rel="stylesheet" href="/sos/plugins/system/rokbox/themes/light/rokbox-style.css" type="text/css" />
<link rel="stylesheet" href="/sos/components/com_gantry/css/gantry.css" type="text/css" />
<link rel="stylesheet" href="/sos/components/com_gantry/css/grid-12.css" type="text/css" />
<link rel="stylesheet" href="/sos/components/com_gantry/css/joomla.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/joomla.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/customstyle.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/extended.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/sos-styles.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/template.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/typography.css" type="text/css" />
<link rel="stylesheet" href="/sos/templates/sos/css/fusionmenu.css" type="text/css" />
<script type="text/javascript" src="/sos/components/com_gantry/js/mootools-1.2.5.js"></script>
<script type="text/javascript" src="/sos/plugins/system/rokbox/rokbox-mt1.2.js"></script>
<script type="text/javascript" src="/sos/plugins/system/rokbox/themes/light/rokbox-config.js"></script>
你可以从该template.css文件上面看到被加载,如果我去了Chrome,CSS3的边界半径代码被执行,所以我知道该文件加载。由于某些原因,当在IE中查看页面时,饼图行为不起作用。由于某种原因,角落只是左方:-S。尽管他们表现为拥有'form_field'类。我已经通过CSS3PIE网站上的故障排除文档,但似乎找不到任何解决方案。
编辑>>>>>>>>>>>>>>>>>>>>>>>>
我甚至试图把它自己的css文件在我的网站的根:
,当在源视图点击加载CSS文件,所以我知道这是工作,CSS文件里面我已经@charset“UTF-8”;
/* CSS Document */
.form_field {border-radius: 5px !important; color:#fff !important; padding:2px 0px 2px 0px !important; position:relative !important; z-index:99999 !important;
behavior: url(./PIE.htc) !important;}
,所以我现在能想到的唯一的事情是,Joomla是剥离出来的东西,或与别的冲突:-S。
EDIT 2 >>>>>>>>>>>>>>>>>>>>
好了,仍然没有去,我从我的index.php注释掉所有的JS文件确保没有任何事情会与它发生冲突,但仍然没有结果。
编辑3 >>>>>>>>>>>>>>>>>>>>
最后!,对于其他人的利益这里是如何与Joomla和CSS3PIE做到这一点。不知道为什么它不会与PIE.htc一起工作,但是如果你使用PIE.php而不是这个工作。
请叫PIE.CSS一个CSS文件,把这个在您的网站根目录,里面放:
@charset "utf-8";
/* CSS Document */
.YOURCLASSNAME {border-radius: 5px !important; color:#fff !important; padding:2px 0px 2px 0px !important; position:relative !important; z-index:99999 !important;
behavior: url(./PIE.php) !important;}
接下来打开你模板的index.php文件,并把
<link rel="stylesheet" type="text/css" href="./PIE.css" />
下一页去任何你想要的风格,例如在一篇文章中的一些表单字段,并放在: class =“YOURCLASSNAME”任何字段/ divs等你想要的样式。
这时应该,手指交叉工作。 :-)
请检查是否存在行为:url(./ PIE.htc);找到PIE.htc .. – Murtaza
是./PIE.htc如果该文件位于我的网站的根目录下是否正确? ,该文件在那里,但似乎没有工作。 – user1148760
如果它位于你的网站的根目录下,你应该只执行'/ PIE.htc'并删除这个点。 – pduersteler