Get the App
SLTechnology News&Howtos  ›  Development  › 

What is the use of the border-style attribute in css

Shulou Source: shulou.com Published: 2022-06-01 12:15:12 09月21日 Update

This article mainly introduces what is the use of the border-style attribute in css. It is very detailed and has certain reference value. Friends who are interested must finish it!

How do I use the cssborder-style attribute?

The border-style property is used to style all borders of an element, or to style borders individually for each edge. It can have one to four values, for example:

P.one {border-style:dotteddashedsoliddouble;}

P.two {border-style:dottedsoliddouble;}

P.three {border-style:dottedsolid;}

P.four {border-style:dotted;}

Description: the border can only appear if this value is not none.

Property values that can be set:

None: defines no borders.

Hidden: same as "none". Except when applied to tables, where hidden is used to resolve border conflicts.

Dotted: defines a dotted border. Rendered as solid lines in most browsers.

Dashed: define dashed lines. Rendered as solid lines in most browsers.

Solid: defines a solid line.

Double: defines a double line. The width of the double line is equal to the value of border-width.

Groove: defines a 3D groove border. The effect depends on the value of border-color.

Ridge: defines a 3D ridge border. The effect depends on the value of border-color.

Inset: defines the 3Dinset border. The effect depends on the value of border-color.

Outset: defines the 3Doutset border. The effect depends on the value of border-color.

Inherit: specifies that the border style should be inherited from the parent element.

Note: no version of InternetExplorer (including IE8) supports the attribute value "inherit" or "hidden".

Example of cssborder-style property

P.none {border-style:none;}

P.dotted {border-style:dotted;}

P.dashed {border-style:dashed;}

P.solid {border-style:solid;}

P.double {border-style:double;}

P.groove {border-style:groove;}

P.ridge {border-style:ridge;}

P.inset {border-style:inset;}

P.outset {border-style:outset;}

P.hidden {border-style:hidden;}

No borders.

Dotted border.

Dotted border.

Solid border.

Double-sided box.

Grooved frame.

Ridge border.

Embed the border.

Convex border.

Hide the border.

The above is all the content of the article "what is the use of border-style attributes 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: Borders attributes depending on solid lines effects styles dotted lines elements content grooves browsers articles browsing same value interest only width boy buddy Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Huawei MySQL OPPO Reno Docker