Page 1 of 1

CSS Outline Shorthand

Posted: Fri Oct 27, 2023 8:22 am
by Guest
CSS Outline Shorthand


CSS Outline - Shorthand property
The outline property is a shorthand property for
setting the following individual outline properties:

outline-width
outline-style (required)
outline-color

The outline property is specified as one,
two, or three values from the list above. The order of the values does not
matter.
The following example shows some outlines specified with the shorthand outline
property:
A dashed outline.
A dotted red outline.
A 5px solid yellow outline.
A thick ridge pink outline.

Example

p.ex1
{outline: dashed;}p.ex2
{outline: dotted red;}p.ex3
{outline: 5px solid yellow;}p.ex4
{outline: thick ridge pink;}
Try it Yourself »














+1

Reference: https://www.w3schools.com/css/css_outline_shorthand.asp