html - EM 尺寸输入上的 IE 渲染错误

标签 html css internet-explorer-11

以下 html 和 css 导致我在 IE 11 中输入的底部和/或右边缘出现奇怪的“间隙像素”。我试图摆脱它,但我所有常用的技巧都失败了。有什么想法吗?

http://jsfiddle.net/9ev8z1n9/2/

HTML:

<div class="return-to-main">
    <input class="clickable" value="submit" type="button" /> 
</div>

CSS

body{
    font-size: 16px;
}
.return-to-main {
    float: left;
    height: 100%;
    margin-left: 5.5em;
    font-size: 1.4em;
}
.return-to-main input[type="button"] {
    border: 0;
    margin-top: 1.5em;
    color: white;
    border-radius: 5px;

    height: 80px;
    width: 200px;
}

.return-to-main input:not(:active) {
    border: solid 1px rgb(90, 25, 30);
    border-bottom: solid 4px rgb(90, 25, 30);
}

    .clickable {
        border: solid 0.06em rgb(110, 45, 50);
        background-color: rgb(110, 45, 50);
        background: linear-gradient(to bottom, rgb(200, 30, 40) 0%,rgb(110, 45, 50) 49%,rgb(110, 45, 50) 100%);
    }
    .clickable:active {
        background-color: rgb(100, 35, 40);
        background: linear-gradient(to bottom, rgb(100, 35, 40) 0%, rgb(100, 35, 40) 49%,rgb(140, 30, 40) 100%);
    }

编辑:删除 border-radius 似乎可以解决问题,删除线性渐变也是如此。这两者都是整体设计的一部分。

最佳答案

改变:

.return-to-main input:not(:active) {
    border-bottom: solid 4px rgb(90, 25, 30);
}

收件人:

.return-to-main input:not(:active) {
    border-bottom: solid .01em rgb(90, 25, 30);
}

边框大小导致它看起来像那样。

关于html - EM 尺寸输入上的 IE 渲染错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30666234/

相关文章:

文档之间的 Javascript 和 jQuery 不起作用

html - 如何消除表格和水平线之间的分隔?

javascript - 用 javascript 在头部注入(inject) css 代码动态编辑 css 好吗?

Javascript Div的宽度根据屏幕宽度

javascript - 如何在 javascript 中检测 Windows 10 上的 IE11?

css - 图像的水平对齐

html - 如何限制父标签内的文本或 div

javascript - ionic 切换和范围的背景颜色

css - 在 Polymer 3 中使用共享样式模块的正确方法

html - CSS 效果在 Chrome 中有效,但在 IE 11 中无效