How to hide part of the lines written by the before pseudo-class, or how to write it.

this is the code:
.nav-item-style {
margin: 3rem 3rem 3rem 3remt;
}

.nav-item-style:before,. Nav-item-style:after {
content:";
position: absolute;
margin-top: 0;
background: gray;
width: 5remt;
height: 1.5px;
}

.nav-item-style:before {
margin-left:-4.9remr;
}

.nav-item-style:after {
margin-left: 3.7remt;
}

this is the effect picture (that is, the part of the circle is removed):

clipboard.png

Apr.11,2021


.nav-item-style
.nav-item-style-parent 
.nav-item-style before after 



 
 before




you can control which before pseudo-classes are needed before you write before, using selectors to control the hiding of the first and last classes or not


.nav-item-style:first-child:before {
    display: none;
}
Menu