Typefully

Outline property in CSS šŸš€

Avatar

Share

 • 

4 years ago

 • 

View on X

Outline property in CSS šŸš€ Thread 🧵
Outline property • used to draw a line around the elements or outside of the borders of elements • outline is not a part of elements dimensions • there are four different categories for outline properties : ā‘  outline-style ā‘” outline-width ā‘¢ outline-color ā‘£ outline-offset
Let's discuss each one by one šŸ‘‡ ā‘  outline-style • outline-style property declared the style of the outline • outline-style values : auto, none, dotted, dashed, solid, double, groove, hidden, inset, ridge etc. Example šŸ‘‡
ā‘” outline-width • outline-width property declared the thickness of the outline • outline-width values : thin, medium, thick and a specific size etc. Example šŸ‘‡
ā‘¢ outline-color • outline-color property declared the color of the outline • outline-color values : name, hex, rgba, hsl etc. Example šŸ‘‡
ā‘£ outline-offset • used to adds space between border or edge and outline of an elements • space between an element and its outline is transparent • negative value places the outline inside the element Example šŸ‘‡
Outline shorthand • you can set only style(required), width and color • unable to set outline-offset value • syntax : outline : width style color; Example šŸ‘‡
Difference between outline and border property šŸ‘‡ • Outline elements are not part of dimensions. However, they are part of the border element. • Outline has no effect on element Size. However, border affects the element Size. • Outline cannot be rounded. End thread 🧵
If this thread helpful for you then 1. Do Retweet the FIRST TWEET. 2. Follow me and turn on the notifications: @personalvipin Thank you ā£ļø
Avatar

Vipin

@SocialWithAI

HTML is šŸ”„ | CSS is ā£ļø Hi šŸ‘‹ I'm Vipin, I'm learning web2 and sharing my knowledge with you guys in easy ways.