Get the App
SLTechnology News&Howtos  ›  Development  › 

How CSS sets the style, color, and width of element outlines

Shulou Source: shulou.com Published: 2022-06-01 13:13:23 10月02日 Update

This article mainly introduces how to set the style, color and width of element outline by CSS. It is very detailed and has certain reference value. Friends who are interested must read it!

CSS profile

The CSS outline attribute specifies the style, color, and width of the outline of the element.

The outline is a line drawn around the element, located on the periphery of the edge of the border, and can highlight the element.

Draw a line around the element

P {border: red solid thin; outline: # 00ff00 dotted thick;}

Set the style and color of the outline

P {border: red solid thin; outline-style: dotted; outline-color: # 00ff00;}

Set the style and width of the outline

P.one {border: red solid thin; outline-style: solid; outline-width: thin;} p.two {border: red solid thin; outline-style: dotted; outline-width: 3px;}

CSS profile attribute and description

Outline: set all the profile properties in a declaration.

Outline-color: sets the color of the outline.

Outline-style: sets the style of the outline.

Outline-width: sets the width of the outline.

The above is all the content of the article "how to set the style, color and width of element outlines by CSS". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Outline element style width color attribute content article value function interest boy partner more knowledge industry information channel border edge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Xiaomi Linux Shulou Tech Info macOS