The CSS outline property is line drawed outside the element’s border
Be careful: Outline differs from borders! Unlike border, the outline is drawn outside the element’s border, and may overlap other content. Also, the outline is NOT a part of the element’s dimensions; the element’s total width and height is not affected by the width of the outline.
Values
<'outline-color'>
Sets the color of the outline. Defaults to currentcolor
if absent.
<'outline-style'>
Sets the style of the outline. Defaults to none
if absent.
<'outline-width'>
Sets the thickness of the outline. Defaults to medium
if absent.
CSS Outline Style
The outline-style
property specifies the style of the outline, and can have one of the following values:
dotted
– Defines a dotted outlinedashed
– Defines a dashed outlinesolid
– Defines a solid outlinedouble
– Defines a double outlinegroove
– Defines a 3D grooved outlineridge
– Defines a 3D ridged outlineinset
– Defines a 3D inset outlineoutset
– Defines a 3D outset outlinenone
– Defines no outlinehidden
– Defines a hidden outline
Check it out how it looks each style:
See the Pen Outline styles by Carles Rider (@carlesrider) on CodePen.
And try to play with our generator:
Leave a Reply