【问题标题】:rounded corners IE and background images圆角 IE 和背景图像
【发布时间】:2011-03-22 16:49:01
【问题描述】:

我的页面中有一个项目:

<div class="rounded">
<h2>Heading Text</h2>
<ul>
    <li><a href="/default.aspx">Summary link</a></li>
    <li><a href="/default.aspx">Summary link</a></li>
    <li><a href="/default.aspx">Summary link</a></li>
</ul>
<p>or... some text or whatever</p>
</div>

与此块关联的样式是:

.rounded{
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
background:url("10x10.50percentalpha_white.png") repeat scroll left top transparent;
height:270px;
overflow:hidden;
padding:0 0 5px;
}

.rounded h2{
-moz-border-radius-topleft:5px;
-moz-border-radius-topright:5px;
-webkit-border-top-right-radius:5px;
-webkit-border-top-left-radius:5px;
border-top-right-radius:5px;
border-top-left-radius:5px;
background:url("wide_rl_fade.png") repeat-y scroll right top transparent;
color:#C4161C;
font-size:130%;
padding:10px 20px;
text-align:left;
text-transform:uppercase;
}

当然,这在 FF 和 safari(和歌剧)中是一种享受。但 IE 什么也没做(我多么讨厌 IE) 我做了一些搜索,找到了 DD_roundies 解决方案。 http://www.filamentgroup.com/lab/achieving_rounded_corners_in_internet_explorer_for_jquery_ui_with_dd_roundi/ 但遗憾的是,这只是删除了背景,从而呈现了具有透明背景的列表和标题文本 - 当不使用不透明度或 bg 图像时工作正常,但这显然不适合我的问题...... 有人知道解决方案吗? 我当然可以放弃 bg 图像,但这似乎是让不透明度跨浏览器工作的最可靠方法..

谢谢

自然

【问题讨论】:

    标签: javascript css internet-explorer rounded-corners


    【解决方案1】:

    您用于圆角的样式仅被 Firefox 和 Webkit 浏览器识别。您真正拥有的唯一其他解决方案是使用背景图像。我使用的一个 jQuery 插件非常好,但对于 Internet Explorer,它只是将图像放在角落上以实现圆润的错觉。这里是:http://jquery.malsup.com/corner/

    编辑:CSS3 将有一个标签来实现这一点,但它仍然不受任何当前 IE 版本的支持:http://www.w3.org/TR/css3-background/#the-border-radius

    【讨论】:

    • 感谢 liam,但我知道这一切,我只是想找到一个适合我所拥有的解决方案。感谢您的回复。
    • 这就是问题老兄,我不认为有一个!无论如何,祝你好运。
    【解决方案2】:

    查找http://css3pie.com/,它使用附加行为为 IE 提供一些 css3 功能。

    【讨论】:

      【解决方案3】:

      实际上不是一个答案.. 不要向我开枪,但需要比 cmets 允许的更多的字符

      谢谢你的回复。。

      虽然这似乎不适用于带有 alpha'd png 的背景 这是一种耻辱,因为这似乎正是我所需要的.. 试过了

      .rounded{
      -moz-border-radius:5px;
      -webkit-border-radius:5px;
      border-radius:5px;
      background:url("10x10.50percentalpha_white.png") repeat scroll left top transparent;
      height:270px;
      overflow:hidden;
      padding:0 0 5px;
      behaviour: url(path/to/PIE.htc)
      }
      

      我正在使用带有 alpha 的背景图像将 opcatiy 或其他任何内容放在 div 上,然后将内容也设置为 alpha .. 不想要那个..

      还有其他建议吗? 除非有人可以解释一种在不影响所包含文本/内容的 alphaness 的情况下很好地获得背景 alpha 的方法。

      有了 M$ 的所有资金,为什么他们不能像其他人一样获得圆角工作.. 嗯? tossers - 总是花很多时间让 IE 中的东西在其他地方都能正常工作..

      【讨论】:

        猜你喜欢
        • 2012-06-16
        • 1970-01-01
        • 1970-01-01
        • 2016-03-18
        • 2014-05-11
        • 2020-05-11
        • 2017-01-14
        • 2020-10-25
        • 2013-10-07
        相关资源
        最近更新 更多