Home > Web Front-end > Front-end Q&A > What is border in css3

What is border in css3

WBOY
Release: 2022-03-25 15:49:09
Original
3471 people have browsed it

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.

What is border in css3

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

What is border in css3

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>
Copy after login

Output result:

What is border in css3

##(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!

Related labels:
css
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template