html - 0px 的 CSS border-width 仍然在 Internet Explorer 中呈现 1px?

标签 html css internet-explorer

我有以下内容:

.icon {
 border-style: solid;
 border-width: 2px 2px 0 0;
 transform: rotate(-45deg);
}

底部边框设置为 0 像素,但在下面的图像中,边框仍以 1 像素呈现。负值显然不是一个选项。

Border is still appearing.

最佳答案

根据 somethinghere 的建议将 border-bottom:none 添加到 .icon 中,如下所示:

.icon {
    border-style: solid;
    border-width: 2px 2px 0 0;
    border-bottom: none;
    transform: rotate(-45deg);
}

或者:

.icon{
    border-top: 2px solid #454545;
    border-right: 2px solid #454545;
    transform: rotate(-45deg);
}

请尝试在IE中查看此页面,看看问题是否解决。

.box{
  width:100px;
  height:100px;
  margin: 100px auto;
}
.icon{
  border-top: 2px solid #454545;
  border-right: 2px solid #454545;
  transform: rotate(-45deg);
}
<div class="box icon"></div>

关于html - 0px 的 CSS border-width 仍然在 Internet Explorer 中呈现 1px?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31409793/

相关文章:

css - 如何在 IE8 中使用 CSS 旋转和平移?

javascript - 将浏览器重定向到表单输入。简单的JS

javascript - 以水平格式而不是垂直格式显示由 html/javascript 生成的 csv 文件

html - wkhtmltopdf 百分比小数

html - Bootstrap 到 PDF 转换

jquery - 花式盒子 2 : put thumbnails within a parent div

javascript - 获取网站中元素的“默认”属性

internet-explorer - 如何在 Ubuntu 上安装 Internet Explorer?

html - Internet Explorer 忽略 flexbox 容器的宽度

html - JackMagic7 网站 Bootstrap ?