Home>Article>Daily Programming> What are the css properties for rounded borders?

What are the css properties for rounded borders?

hzc
hzc Original
2020-06-12 15:16:15 10410browse

What are the css properties for rounded borders?

What are the css properties of the rounded border:

1. Introduction to the rounded border

It is to set the four corners of the element through the border-radius attribute {the attribute is not inherited}.

border-radius has four attributes: top, left, right, bottom, which can be used to set pixels. You can also directly set a value so that all four sides are equal.

    Document  

What are the css properties for rounded borders?

You can also set two values border-radius at the same time: 50px 99px; correspondingly, they are 50px for top and bottom, and 99px for left and right. You can also set three values to set the border-radius clockwise: 50px 99px 40px; the top is 50px, the left and right are 99px, and the bottom is 40px.

2. You can also use border-radius: r to set a circle. The r here refers to the size of the radius (with a length unit). To create a circle, you should set the value of r to the height of the element. and half the length. When the height and width are equal, this method of selecting the value is that the circle will develop towards an ellipse as the width and height are changed.

    Document  

Circle:

What are the css properties for rounded borders?

Oval;

Recommended tutorial: "css tutorial

The above is the detailed content of What are the css properties for rounded borders?. 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