Border radius
Border radius are here, at last, and they are here to stay. Although the have been abused for years, border radius property is more versatile than you can imagine for sure. Let's see some cool effects!
div {
width:150px;
height: 150px;
margin: 10px;
float: left;
border: 10px solid #F54;
}
/*
Specify the readius for all corners.
*/
.rounded {
border-radius: 30px;
}
/*
You can use assymetric radius. Just provide horizontal / vertical.
*/
.asymmetric-radius {
border-radius: 30px / 90px;
}
/*
You can specify a distinct radius by corner.
*/
.asymmetric-corners {
border-radius: 90px 60px 30px 5px;
}
/*
You can use percentages...
Hey! It's a circle!
*/
.percentages {
border-radius: 50%;
}
/*
And you can provide them with sub properties.
*/
.sub-properties {
border-top-left-radius: 10px;
/* Note there is no / symbol here! */
border-bottom-right-radius: 80px 40px;
}
/*
border-radius is not only used for rounding corners.
*/
.brackets {
border-top: none;
border-bottom: none;
border-radius: 30px / 90px;
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.