Home > Article > Web Front-end > What is border in css3
In CSS3, border is a shorthand attribute used to set the border of an element; the attribute values of this attribute are used to set the width, style and color of the element border in order, and the syntax is "border: border width border Style border color;" is allowed if a certain value is not set.
The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.
The border shorthand attribute sets all border attributes in one statement.
You can set the following properties in order:
border-width specifies the width of the border.
border-style Specifies the style of the border.
border-color specifies the color of the border.
If you do not set one of the values, there will be no problem. For example, border:solid #ff0000; is also allowed.
The example is as follows;
<html> <head> <style type="text/css"> p { border: medium double rgb(250,0,255) } </style> </head> <body> <p>Some text</p> </body> </html>
Output result:
##(Learning video sharing:css video tutorial)
The above is the detailed content of What is border in css3. For more information, please follow other related articles on the PHP Chinese website!