Create beautiful boxes using the outline CSS property

outline is a line outside the border of a container. Let’s create a simple rectangle and apply an outline and see how cool 😎 it is.

The syntx for ourline is outline: size type color;


The above code will create a beautiful frame πŸ–ΌΒ .

The available values are

outline: auto β†’ Permits the user agent to render a custom outline style.


outline: dotted β†’ The outline is a series of dots instead of a solid line.


outline: double β†’ The outline is two single lines. The outline-width is the sum of the two lines and the space between them.


We can also set the offset of the outline using outline-offset property.


outline: dashed β†’ The outline is a series of short line segments.


outline: groove β†’The outline looks as though it were carved into the page.


outline: ridge β†’ The opposite of groove. The outline looks as though it were extruded from the page.


Difference between groove and ridge.


outline: inset β†’ The outline makes the box look as though it were embedded in the page.


outline: outset β†’ The opposite of inset. The outline makes the box look as though it were coming out of the page.


You can set the outline as none, so that it doesn’t have an outline.

If you find this helpful surprise 🎁 me here.

Share if you feel happy πŸ˜ƒ πŸ˜† πŸ™‚Β .

Follow Javascript JeepπŸš™ if you feel worthy.


https://gitconnected.com/learn/css

Leave a comment

Design a site like this with WordPress.com
Get started