Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use the border-radius property in css

Shulou Source: shulou.com Published: 2022-06-01 11:10:14 10月03日 Update

This article mainly introduces how to use the border-radius attribute in css. It is very detailed and has a certain reference value. Friends who are interested must read it!

CSS3border-radius attribute

Purpose: the border-radius property is used to create fillets

Description: the border-radius attribute is a composite property that can specify up to four border-*-radius attributes.

Basic syntax:

Border-radius:1-4length |%

Note: the order of the four values of each radius is: upper left corner, upper right corner, lower right corner, lower left corner. If you omit the lower left corner, the upper right corner is the same. If you omit the lower right corner, the upper left corner is the same. If you omit the upper right corner, the upper left corner is the same.

An example of using the css3border-radius attribute

Div

{

Text-align:center

Border:2pxsolid#a1a1a1

Padding:10px40px

Background:#dddddd

Width:350px

Border-radius:25px

-moz-border-radius:25px;/*, old Firefox*/.

Margin:100pxauto

}

The border-radius attribute allows you to add fillets to an element.

The above is all the content of the article "how to use the border-radius attribute in css". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Tags: Attributes same upper left corner content fillet article value function element interest radius guys buddies more knowledge examples industry grammar information information channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Huawei Shulou Technology MySQL vpn