想要实现以下的效果:
给个思路,在外元素里嵌套一个专门做border的内元素
<style>
.box{
width:100px;
height:100px;
background-color:#ccc
}
.box-border{
position:relative;
left:25px;
width:50px;
height:100px;
border-bottom:1px solid #000;
}
</style>
<div class="box">
<div class="box-border">
</div>
</div>
3 回答5k 阅读✓ 已解决
5 回答1.8k 阅读
2 回答1.8k 阅读✓ 已解决
1 回答2.9k 阅读✓ 已解决
3 回答2.4k 阅读
4 回答2.1k 阅读
1 回答1.9k 阅读✓ 已解决
这个很多方法实现,不是用的border。推荐伪元素:after