Anyway to set css outline
only show left and right ? Because I can't use border, I tried but it will make more bad outlook .
.test{
margin:10px;
padding:10px;
width:100px;
height:10px;
outline:10px solid #000;
}
<div class="test"></div>
An outline is a line that is drawn around elements, OUTSIDE the borders, to make the element "stand out". CSS has the following outline properties: outline-style.
You could possibly achieve this using two box shadows:
div {
margin: 10px;
padding: 10px;
width: 100px;
height: 10px;
box-shadow: -5px 0px 0px 0px black, 5px 0px 0px 0px black;
}
<div></div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With