IE8中的CSS圆角

fal*_*ter 58 css internet-explorer rounded-corners internet-explorer-8

我在IE8中遇到圆角问题.我尝试了一些没有成功的方法.

这是我的代码:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Page</title>

<style>
body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.8em;
  padding: 2px;
  margin: 2px;
  color: #505050;
  line-height: normal;
}
p {
  margin: 4px;
}
.categoryheading3 {
  -moz-border-radius-topleft: 5px;
  -moz-border-radius-topright: 5px;
  -webkit-border-top-left-radius: 5px;
  -webkit-border-top-right-radius: 5px;
  background-color: #297BB6;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 0;
  text-align: center;
  margin: 0px;
}
.leftcolumn {
  width: 174px;
  padding: 8px;
  float: left;
  display: inline-block;
  background-color: transparent;
  /*--min-height: 500px*/
  overflow: hidden;
}
.lefttop {
  display: inline-block;
  width: inherit;
  margin: 0 5px 2em 0;
  float: left;
  width: 160px;
  background-color: #FFFFFF;
  border: 2px solid #297BB6;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  border-radius: 10px;
}
</style>


</head>
<body>

<div class="leftcolumn">
  <div class="lefttop">
    <H4 class="categoryheading3">Heading</H4>
    <p>sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text sample text </p>
  </div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)

哪个在Firefox中产生这个:

firefox的例子

但这在IE8中:

IE8让我难过

如果有人有任何提示,我将非常感激!

编辑:约瑟夫帮助建议使用pie.htc,但是我仍然在努力解决这个问题:

.categoryheading3 {
  -moz-border-radius: 5px 5px 0 0;
  -webkit-border-radius: 5px 5px 0 0;
  behavior: url(PIE.htc);
  background-color: #297BB6;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 0;
  text-align: center;
  margin: 0px;
}
Run Code Online (Sandbox Code Playgroud)

Jos*_*ber 69

Internet Explorer(在版本9下)本身不支持圆角.

有一个神奇的脚本可以为你神奇地添加它:CSS3 PIE.

我已经使用了很多次,效果惊人.

  • @kevyn:你能告诉我你正在使用的CSS吗?CSS3 PIE仅支持速记属性(`border-radius:5px 5px 0 0;`),而不支持简写属性(`border-radius-topleft:5px; etc.`). (4认同)
  • 您只使用供应商前缀版本.CSS3 PIE使用标准的:`border-radius`. (3认同)

Lio*_*rom 33

IE8中的圆角

的Internet Explorer 8(或更早版本)支持圆角,但是也有可能会考虑一些其他的解决方案:

  • Images改为使用圆角(这个生成器是一个很好的资源)

  • jQuery Corner plugin这里使用a

  • 使用CSS3 PIE这里调用的非常好的脚本(Pro's&Con's 在这里)

  • CSS Juice这里结账

  • 另一个好脚本IE-CSS3来自这里

尽管CSS PIE是最受欢迎的解决方案,但我建议您查看所有其他解决方案并选择最适合您需求的解决方案.

希望它有用.祝好运!