Home >Web Front-end >CSS Tutorial >How to set borders in css

How to set borders in css

coldplay.xixi
coldplay.xixiOriginal
2021-04-15 16:05:2919452browse

How to set the border in css: 1. Set the border in a border abbreviation attribute; 2. Set the border style in sequence according to the [border-width], [border-style], and [border-color] attributes.

How to set borders in css

The operating environment of this tutorial: windows7 system, css3 version, DELL G3 computer.

How to set the border in css:

1. Set the border in a border abbreviation attribute.

<html>
<head>
<style type="text/css">
p 
{
border: medium double rgb(250,0,255)
}
</style>
</head>
<body>
<p>Some text</p>
</body>
</html>

Rendering:

How to set borders in css

2. Set the border style in sequence according to the border-width, border-style, and border-color attributes.

Example:

<html>
<head>
<style type="text/css">
p 
{
border-width:medium;
border-style:double;
border-color:rgb(250,0,255);
}
</style>
</head>
<body>
<p>Some text</p>
</body>
</html>

Rendering:

How to set borders in css

##Related learning recommendation: css tutorial

The above is the detailed content of How to set borders in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:How to set css to centerNext article:How to set css to center