边框在 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;
}
最佳答案
我很高兴我的评论奏效了!我不确定,所以我将其作为评论发布,但在这里它是一个答案,因此人们可以接受/投票:
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/