【问题标题】:Rounded Corners in IE9IE9中的圆角
【发布时间】:2012-02-13 12:52:23
【问题描述】:

我正在尝试为IE 的所有版本放置一个seperate CSS 并尝试使用以下CSS,但它没有给我任何rounded corners

谁能指出正确的道路

这是我的 CSS:

   -moz-border-radius-topleft:5px;
    -moz-border-radius-bottomleft:5px;
    -moz-border-radius-bottomright:5px;
    -webkit-border-top-left-radius:5px;
    -webkit-border-bottom-left-radius:5px;
    -webkit-border-bottom-right-radius:5px;
    display:none;
    background-color:#ddeef6;
    position:absolute;
    width:230px;
    z-index:150;
    border:1px transparent;
    text-align:left;
    top: 24.5px; 
    right:84px; 
    margin-top:-53px;
    margin-right: 0px;
    *margin-right: -1px;
    color:#789;
    font-size:11px;
    padding: 5px;

我尝试通过添加下面的 url 来解决我的问题,我认为它们在我使用它们之前绝对完美,然后它运行良好,但在这种情况下,我的 css 部分出了问题。

behavior url('css/PIE.htc')
behavior url('css/ie-css.htc')
behavior url('css/border-radius.htc')

【问题讨论】:

    标签: internet-explorer css internet-explorer-9 rounded-corners


    【解决方案1】:

    您在 CSS 中使用了特定于供应商的规则。使用 IE9 的“标准化”版本:

    border-radius: 5px 0 5px 5px;
    

    -moz- 特定规则可以以类似的方式缩短。 Webkit(据我所知)不允许使用短格式。

    这里有一些附加信息:border-radius

    【讨论】:

    • @Jonah-非常感谢它运行良好,我只需要左上角、右下角和左下角,那么我该如何更改呢?
    • 我提供的规则应该完成所有 4 个角。我相信顺序是左上,右上,右下,左下。如果您想单独指定它们,只需使用:border-bottom-left-radius 等。
    • 这很神奇-再次感谢您指出正确的方法。
    【解决方案2】:

    添加border-radius-topleft:5px; 边框半径左下角:5px; 边框半径右下角:5px;

    【讨论】:

      猜你喜欢
      • 2011-06-02
      • 1970-01-01
      • 2012-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-02
      • 2023-03-13
      • 1970-01-01
      相关资源
      最近更新 更多