Rounded Corners in CSS

Rounded Corners in CSS ka use elements ke corners ko smooth aur round banane ke liye hota hai using border-radius property.

Yeh property kisi bhi element par apply ho sakti hai jisme:

  • background-color ho
  • border ho
  • ya background-image ho

Rounded Corners in CSS ka basic use

border-radius define karta hai ki corners kitne round honge.

Example:

Rounded Corners in CSS

Rounded Corners with border

Example:

Rounded Corners in CSS with border

Rounded Corners with background image

Example:

Rounded Corners in CSS with background image

Shorthand Property of Rounded Corners in CSS

border-radius ek shorthand property hai jo internally 4 corners ko control karti hai:

  • border-top-left-radius
  • border-top-right-radius
  • border-bottom-right-radius
  • border-bottom-left-radius

Different values in CSS Rounded Corners

 CSS Rounded Corners me tum 1 se 4 values de sakte ho:

Four values

Four values

Three values

Three values

Two values

Two values

One value

One value

Elliptical shapes

Agar tumko different horizontal aur vertical radius chahiye, toh / use hota hai.

Example:

Elliptical shapes

Circle & Oval

Rounded Corners in CSS ka sabse cool use:

Oval shape

Oval shape

Perfect circle

Perfect circle

CSS Rounded Corners use karke tum simple boxes ko modern, smooth aur aesthetic shapes me convert kar sakte ho—chahe woh normal rounded corners ho, elliptical shapes ho, ya perfect circles.

Leave a Comment