当我输入这个时:
<style>
.tavit{
width:400px;
height:300px;
background-color:yellow;
border:dashed; /*First I applied - border:dashed double (In order to get a double dashed border - but it didn't work for some reason*/
border-style:double;
margin:auto;
font-size:medium;
text-align:right;
}
.adom {
color: red;
font-size: xx-large;
text-align: center;
}
</style>
没有任何作用。就像它甚至是一个或另一个。我错过了什么? 谢谢
最佳答案
你可以简单地用一个div
来解决这个问题,你可以使用outline和border,然后使用outline-offset
属性
.test {
background:white;
padding:15px;
border:1px dashed #000;
outline:1px dashed #000;
outline-offset:-5px;
}
<div class="test">see this</div>
关于html - 如何启用双虚线边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43843359/