Home > Web Front-end > Front-end Q&A > What does border mean in css

What does border mean in css

青灯夜游
Release: 2019-05-29 17:09:41
Original
22704 people have browsed it

What does border mean in css

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

Rendering:

What does border mean in css

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!

Related labels:
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