View video tutorial
CSS Outline Offset
CSS
This property adds space between an outline and the border.
CSS outline-offset property
The outline-offset property is used to add space between an outline and the border of an element.
Example
.p1 {
outline-width: 5px;
outline-style: solid;
outline-color: red;
outline-offset: 1px;
border: 2px solid black;
}
.p2 {
outline-width: 5px;
outline-style: solid;
outline-color: #32b853;
outline-offset: 5px;
border: 2px solid black;
}
Click on the "Try it Now" button to see how it works.