-
Book Overview & Buying
-
Table Of Contents
Web Developer's Reference Guide
By :
With this property, we can not only make rounded corners but also circles, ellipses, and other interesting shapes.
I admit that the term "rounded corners" is far less obscure than "border radius".
The
border-radius CSS property allows us to make rounded corners on almost any HTML element, and it looks like this:
border-radius: 20px;
The border-radius attribute is also the shorthand syntax for the border-top-left-radius, border-top-right-radius, border-bottom-right-radius, and border-bottom-left-radius properties.
Using either a circle or an ellipse, we can create rounded corners:

There are two values: a length value and a percentage value.
This is when we use one of the following units: px, em, in, mm, cm, vw, and so on.
This is when we use percentages such as 50%, 85%, and so on.
We can use, one, two, three, or four values in the same declaration. We can also use a slash symbol, "/", to separate groups of values.
Sometimes, the...
Change the font size
Change margin width
Change background colour