<

[Webinar] Learn how to a build a cloud-first strategyRegister Now

x

Rounded Corner Effect in CSS

Posted on
6,162 Points
62 Views
1 Endorsement
Last Modified:
Experience Level: Beginner
3:30
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
Comment
0 Comments

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Join & Write a Comment

Suggested Videos

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Suggested Courses
Course of the Month20 days, 9 hours left to enroll

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month