html - 圆圈在 IE8 中显示不正确

标签 html internet-explorer-8 css

我需要在 IE8 中绘制一个倾斜的椭圆。

使用 PIE.js 显示边框半径

要在其他浏览器中显示,请使用代码:

.levelConfidenceCircleBlue {
    position: relative;
    float: left;
    width: 19px;
    height: 18px;
    background: none;
    z-index: 10;
    margin-top: -8px;
    margin-left: 5px;
    margin-right: 2px;
}

.levelConfidenceCircleBlue:before,
.levelConfidenceCircleBlue:after {
    position: absolute;
    content: "";

    width: 15px;
    height: 18px;
    left: 0px;
    background: #00A7E7;
    -moz-border-radius: 50px/63px;
    border-radius: 50px/63px;
    -webkit-transform: rotate(26deg);
       -moz-transform: rotate(26deg);
        -ms-transform: rotate(26deg);
         -o-transform: rotate(26deg);
            transform: rotate(26deg);
    -webkit-transform-origin: 0 100%;
       -moz-transform-origin: 0 100%;
        -ms-transform-origin: 0 100%;
         -o-transform-origin: 0 100%;
            transform-origin: 0 100%;
}

为使用 IE8 hack 进行调整:

<! - [if IE 8]>
.levelConfidenceCircleBlue:before,
.levelConfidenceCircleBlue:after {
    position: absolute;
    content: "";

    width: 15px;
    height: 18px;
    left: 0px;

    background: none;
    border-radius: 60px 40px 60px 40px;
    -pie-background: #00A7E7;
}
<! [endif] ->

没变。但是,如果您将其更改为:

<! - [if IE 8]>    
.levelConfidenceCircleBlue {
        position: relative;
        float: left;
        width: 19px;
        height: 18px;
        background: none;
        z-index: 10;
        margin-top: -8px;
        margin-left: 5px;
        margin-right: 2px;
    }

    .levelConfidenceCircleBlue:before,
    .levelConfidenceCircleBlue:after {
        position: absolute;
        content: "";

        width: 15px;
        height: 18px;
        left: 0px;

        background: none;
        border-radius: 60px 40px 60px 40px;
        -pie-background: #00A7E7;
    }
<! [endif] ->

它在 IE9 中的 IE8 中正确显示 - 显示正方形,在其他浏览器中 - 不显示任何内容。 除了常规类(class)之外,没有 hack/*/和\0/不起作用。

你能告诉我如何解决这个问题吗?

最佳答案

您的 IE 条件标签似乎有误。

<!--[if IE 8]> IE 8.0 <![endif]-->

关于html - 圆圈在 IE8 中显示不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11948588/

相关文章:

html - css 伪选择器 :checked 的奇怪行为

javascript - 脚本在 html 正文标签之外不工作

javascript - 为什么我的 JavaScript Twitter feed 无法在 Internet Explorer 中运行?

html - 无法取消 IE 8 中 <select> 上的填充

css - 如何将规则导入sass中的另一个规则?

javascript - 当 div 在屏幕底部的 (x) 像素内滚动时 AngularJS 调用函数

javascript - ng-disabled 每次单击按钮时都不会评估

html - ie8 和 ie9 中的表格单元格内容旋转错误

html - 在 div 和表单之间创建间隙

html - 如何使 Bootstrap 3 列在更大的设备上换行内容?