实现div两侧的竖线比div的高度小

2024-05-11  本文已影响0人  泪滴在琴上
微信截图_20240512201512.png

通过before和after实现的,

&:nth-child(2){
                            &::before {
                                content: ""; 
                                position: absolute; 
                                left: 0; 
                                top: 15%; 
                                height: 70%; 
                                border-left: 1px solid #645F72; 
                            }
                            &::after {
                                content: ""; 
                                position: absolute; 
                                right: 0; 
                                top: 15%; 
                                height: 70%; 
                                border-right: 1px solid #645F72;
                            }
                        }
上一篇 下一篇

猜你喜欢

热点阅读