繁体   English   中英

CSS虚线边框在IE8中始终显示为白色,为什么?

[英]CSS dashed border always appears white in IE8, why?

这是交易,我有以下虚线框的div:

.dashed-header {
    /*background-color: transparent;*/
    height: 87px;
    margin-top: 5px;
    border-top: 1px dashed #613e27;
    border-bottom: 1px dashed #613e27;
}

由于某种原因,边框是白色的,而不是#613e27 ,我不知道为什么是白色的? 这是我的网页,您可以在深褐色标题行中看到此边框

尝试使用:

border-color: #613e27 !important;

我有IE8,并且工作正常,我将其放在另一个div中以查看颜色是否消失,但是颜色仍然存在

<style>
.main {
    height: 200px;
    width:200px;
    margin-top: 5px;
    border: 1px solid black;
    background-color:#A1Ae27;
    padding: 15px;
}
.dashed-header {
    /*background-color: transparent;*/
    height: 87px;
    width:100px;
    margin-top: 5px;
    border-top: 1px dashed #613e27;
    border-bottom: 1px dashed #613e27;
}
</style>
<body>

<div class="main">
    <div class="dashed-header">
    </div>
</div>
</body>

尝试更改为实线边框,看看它们在EI8中是否也出现白色?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM