<

Rounded Corner Effect in CSS

Posted on
6,171 Points
71 Views
1 Endorsement
Last Modified:
Published
Experience Level: Beginner
3:29
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property

Video Steps

1. Begin with a normal styled element such as a div

2. To style all four corners of the div to be the same degree of roundness, use the "border-radius:" property and type a pixel value. The larger the number, the rounder the corner will be. A value of 0px will lead to a 90-degree angled corner

3. To style all four corners to have different degrees of roundness, type four different pixel values

4. The four different pixel values will style the corners clockwise starting from the top left. The first value will style the top left corner, the second value will style the top right corner, the third value will style the bottom right corner, and the fourth value will style the bottom left corner

5. For maximum compatibility, copy your border-radius property three more times, each time with a different compatibility prefix. You should end up with border-radius, -moz-border-radius, -webkit-border-radius, and -o-border-radius

1
0 Comments

Suggested Videos

Title Views Activity
Creating Scalable Full-Page Backgrounds in CSS3 144
Alpha Transparency in CSS 114
Drop-Cap Effect in CSS 90
Introduction to CSS (Part 1) 80
This article discusses four methods for overlaying images in a container on a web page
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month