What does border mean in css? What is the use?
border means border. It is an abbreviated attribute of CSS and is used to set all border attributes in one statement. The border properties that can be set include: border width, border style, and border color.
Instructions:
The following attributes can be set in order: border-width, border-style, border-color. Among them
● border-width: Specify the width of the border
● border-style: Specify the style of the border
● border-color: Specify 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.
Example of using css border attribute
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style type="text/css"> p { width: 450px; margin: 50px 0px; } .p1 { border: medium double rgb(250,0,255) } .p2 { border:2px solid red; } .p3 { border:2px dotted rgb(250,0,255); } </style> </head> <body> <p class="p1">Some text</p> <p class="p2">Some text</p> <p class="p3">Some text</p> </body> </html>
Rendering:
The above is the detailed content of What does border mean in css. For more information, please follow other related articles on the PHP Chinese website!