最佳答案
您可以使用 ::before
和 ::after
伪元素来覆盖(并因此“隐藏”)部分边框:
.bordery {
border: 1px solid teal;
padding: 20px;
position: relative;
}
.bordery::after,
.bordery::before {
background-color: white;
content: "";
display: block;
height: 10px;
position: absolute;
width: 10px;
}
.bordery::after {
bottom: -1px;
right: -1px;
}
.bordery::before {
top: -1px;
left: -1px;
}
<div class="bordery">This is just some sample content.</div>
关于html - 如何从 Angular 落移除部分边框?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40803132/