MOTOSHARE 🚗🏍️

Rent Bikes & Cars Directly from Owners

Motoshare connects vehicle owners with people who need bikes and cars on rent. Owners earn from idle vehicles, and renters get flexible ride options.

Visit Motoshare

How to use Outline Property in CSS?

CSS

An outline is a line that is drawn around elements, outside the borders. Outlines never take up space, as they are drawn outside of an element’s content.

  • outline-color
  • outline-style
  • outline-width
  • outline

outline-style–

This property is used to specify the style of an outline. We can set this property to none (default), hidden, dotted, dashed, solid, double, groove, ridge, inset, outset.

Ex: –

div { outline-style: solid;}

outline-color–

This property is used to specify the color of an outline. We can set this property to invert (default) or color.

Ex: –

div { outline-style: solid; outline-color: red;}

outline-width–

This property is used to specify width of an outline. We can set this property to medium (default), thin, thick, length.

Ex: –

div { outline-style: solid; outline-width: thin;}
div { outline-style: solid; outline-width: 5px;}

outline–

This is shorthand of other outline properties.

Syntax: –

Selector {outline: outline-color outline-style outline-width;}

Ex: –

div { outline: red solid 3px;}

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x