Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the outline attribute in css

Shulou Source: shulou.com Published: 2022-06-01 12:14:41 10月04日 Update

This article mainly introduces how to use the outline attribute in css. It is very detailed and has a certain reference value. Friends who are interested must finish it!

CSSoutline attribute

Function: it is a line drawn around the element, located on the periphery of the edge of the border, and can play the role of highlighting the element.

The outline shorthand attribute sets all the outline properties in a declaration. You can set the following properties in order: outline-color,outline-style,outline-width. If you do not set one of these values, there will be no problem, for example, outline:solid#ff0000; is also allowed.

● outline-color: specifies the color of the outline.

● outline-style: specifies the style of the outline.

● outline-width: specifies the width of the outline.

Note: all major browsers support the outline attribute; InternetExplorer8 (and later versions) support the outline attribute only when! DOCTYPE is specified.

An example of using the CSSoutline attribute

Php Chinese website (php.cn)

Div

{

Border:redsolidthin

Outline:#00ff00dottedthick

Padding:10px

}

Test the text!

The above is all the content of the article "how to use the outline attribute in css". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Attributes outlines roles elements content articles support Chinese websites mainstream values interests only width guys buddies text more styles browsers versions Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Redmi Docker vpn macOS