:after伪类方法
.border-line{position:relative;}
.border-line:after{position: absolute; width: 100%; left: 0;bottom: 0; display: block;border-top: 1px solid rgba(7,17,27,0.1); content: ' ';}
本文介绍如何使用 CSS 的 :after 伪类创建底部边框效果,通过相对定位和绝对定位结合,实现一个简单的带边框的线条样式。该技巧适用于网页布局中的各类元素修饰。
:after伪类方法
.border-line{position:relative;}
.border-line:after{position: absolute; width: 100%; left: 0;bottom: 0; display: block;border-top: 1px solid rgba(7,17,27,0.1); content: ' ';}
1273

被折叠的 条评论
为什么被折叠?