【问题标题】:One more Css3Pie not working with border-radius又一个 Css3Pie 不使用边界半径
【发布时间】:2014-10-02 10:27:52
【问题描述】:

我阅读了大量类似的问题并测试了所有解决方案,但没有一个有效...

这是我的 CSS:

.button
{   
    background-image:url(../Immagini/pulsante.jpg) !important;
    background-color:#004878;
    padding:0.4em 1em;
    text-decoration:none !important;
    border-radius:5px 5px 5px 5px;
    border:1px solid #C5DBEC;
    font-weight:bold;
    cursor:pointer;
    margin-right:0.1em;
    overflow:visible;
    position:relative;
    text-align:center;
    display:inline-block;
    behavior: url(../Scripts/css3Pie/PIE.php);
}

我在文件中添加了一个简单的警报(即使在 htc 中),它会显示以便加载文件。

如你所见,我使用 php 版本来避免服务器问题,但没有任何改变

我什至尝试在 css 中删除 !important,但它仍然没有工作

我想念什么?

编辑

这是我的文件夹结构:

ROOT
-->Defalut.aspx
-->Pages
     -->Page.aspx
-->Scripts
   -->cs3Pie
      -->PIE.php
      -->all other css3Pie...
-->Css
   -->Style.css

【问题讨论】:

    标签: css rounded-corners css3pie


    【解决方案1】:

    来自css3pie.com关于行为:

    注意:这个路径是相对于被查看的 HTML 文件的,而不是它被调用的 CSS 文件。

    只有你的绝对路径

    -ms-behavior: url("http://css3pie.com/pie/PIE.htc");
    

    或相对于 html 的路径:

    /* You need to use this code if your html file in <site>/index.php
       And PIE-file in <site>/Scripts/css3Pie/PIE.php
       
       Also check if your get access to PIE-file from your browser
       via link like http://<site>/Scripts/css3Pie/PIE.php
    */
    -ms-behavior: url("/Scripts/css3Pie/PIE.php);
    

    > Working example on CodePen (tested in ie8)

    【讨论】:

    • 我有一个反向代理,不能使用绝对路径,因为它改变了。我写的路径是相对于网页的,因为我所有的页面都在根目录下的文件夹中
    • 你想写下你的index.php、样式文件和PIE.php的文件夹结构吗?如果是这样: /index.php[main page] /Scripts/css3Pie/PIE.php[PIE] 你需要使用 "behavior: url(/Scripts/css3Pie/PIE.php); "
    • 用文件夹结构编辑的问题。网站在 .net 中而不是 php
    • PHP 版本只在支持 php 的服务器上分叉。 IIS 的标准 Asp.net 配置不支持开箱即用的 php。为什么不使用 *.htc 版本?它适用于任何现代服务器。尝试阅读此question。有些人建议使用this trick 相对链接到asp.net。
    猜你喜欢
    • 2012-02-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-10
    • 2011-05-18
    • 1970-01-01
    • 2014-04-30
    • 2012-06-15
    相关资源
    最近更新 更多