css - 正文/容器的边框在 IE 11 中不可见

标签 css html internet-explorer border internet-explorer-11

边框在 Chrome 和 Firefox 中可见,但在 IE 11 中不可见

我用谷歌搜索了一下,之前我的代码是 border:2px solid black ;我将其更改为边框样式,并在多行中添加了所有细节。那没有帮助。

.container{
    margin:10px;
    padding:5px;
    border:2px;
    border-style:solid;
    border-color:black;
    border-radius:3px;
    text-align:center;
}

This is how it looks in Firefox

This is how it looks in IE 11

最佳答案

我很高兴我的评论奏效了!我不确定,所以我将其作为评论发布,但在这里它是一个答案,因此人们可以接受/投票:

Its a weird fix but I have had borders disappear in IE and I fixed it by either adding display:block or display:inline-block to the element depending on what element it was. It is hard to offer better advice without more code to be able to reproduce your issue. This is a hack fix but microsoft will be discontinuing support for IE this year which means you will no longer have to support it as well. Our office is going to throw a party when IE support is officially over :D

很高兴它对你有用!

关于css - 正文/容器的边框在 IE 11 中不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53947578/

相关文章:

html - block Bootstrap 作为平板电脑大小

javascript - 如何使用javascript点击对象数组并在div中显示数据

css - Facebook 选项卡应用程序 - IE8 中的滚动和位置问题

html - 获取 css :pseudo-elements 的点击

jquery - 菜单 css 和 javascript 不工作

html - 创建顶级菜单项和右登录菜单

css - 互联网浏览器 : drop down does not display option font family

javascript - 是否有用于组合/压缩 javascript 和 css 的 Magento 扩展?

jquery - Bootstrap 事件菜单不起作用

internet-explorer - Internet Explorer 中的 Kendo UI Treeview 页面跳转