How to set rounded borders in css

coldplay.xixi
Release: 2023-01-05 16:12:58
Original
19848 people have browsed it

The way to set a rounded border in css is to use the rounded border [border-radius]. If the rounded corners of these four radians are the same, it can be written as [border-radius: 30px;].

How to set rounded borders in css

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

How to set rounded borders in css:

Basic usage of rounded borders (border-radius):

The most basic of rounded borders The usage is to set four rounded corners with the same arc

boder-top-left-radius:30px; //左上角 boder-top-right-radius:30px; //右上角 boder-bottom-left-radius:30px; //右下角 boder-bottom-right-radius:30px; //左下角
Copy after login

If the four rounded corners are the same, it can be written as:

border-radius:30px;
Copy after login

cssSet the rounded border:

css Part:

.div1{ margin:0 auto; background: darkcyan; width:200px; height:200px; border:2px solid darkslategray; border-radius:30px; text-align: center; line-height: 200px; }
Copy after login

html part:

圆角边框
Copy after login

The effect is as shown:

How to set rounded borders in css

Recommended related tutorials:CSS video Tutorial

The above is the detailed content of How to set rounded borders in css. 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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!