CSS rounded corners button
CSS Tutorial » CSS rounded corners button
How to create a Button with Rounded Corners using CSSTo create a rounded corners button, we have to use CSS border-radius property for a button. This property in the specified selector is used to set the rounded coners (boundary radius) of the item..
Syntax:
border-radius: value;
}
/* In this case it sets border-radius value to all 4 corners */
Let's have an example and working on it: first button has border-radius:10px and second has border-radius:16px and third has border-radius:20px
Browser Support CSS button rounded corners
Element | ![]() Chrome |
![]() IE |
![]() Firefox |
![]() Opera |
![]() Safari |
Browser Support option | Yes | Yes | Yes | Yes | Yes |
CSS rounded corners button
How do you make a button with rounded corners?
The create this we use CSS Style with a selector called button1, button1 ..... and we add property border-radius: with different values.
For a better understanding we present an example:
<!DOCTYPE html>
<html>
<head>
<title>css rounded corners button - example</title>
<style>
.button {
border: none;
color: white;
padding: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
margin: 8px 4px;
cursor: pointer;
font-weight: bold;
}
.button1 {
background-color: #09C;
border-radius: 4px;
}
.button2 {
background-color: #060;
border-radius: 8px;
}
.button3 {
background-color: #F00;
border-radius: 12px;
}
.button4 {
background-color: #CCC;
border-radius: 16px;
}
.button5 {
background-color: #00F;
border-radius: 50%;
}</style>
</head>
<body><h2>How do you make a button <br />
with rounded corners?</h2>
Rounded corners to a button with border-radius property:</b><br />
<button class="button button1"> button 4px</button>
<button class="button button2">Procced 8px</button>
<button class="button button3">Delete 12px</button>
<button class="button button4">Default 16px</button>
<button class="button button5">round 50%</button><p> </p>
</body>
<button style=" background-color:#09C; border:none; margin:10px;
padding: 10px 20px; font-weight:bold; color:#FFF; font-size:16px;
border-radius:10px">Button</button>
<button style=" background-color:#060; border:none; margin:10px;
padding: 10px 20px; font-weight:bold; color:#FFF; font-size:16px;
border-radius:10px">Procced</button>
<button style=" background-color:#F00; border:none; margin:10px;
padding: 10px 20px; font-weight:bold; color:#FFF; font-size:16px;
border-radius:10px">Delete</button>
</html>
Related subjects:
CSS rounded coners
CSS rounded corners image
CSS rounded corners button
Tags: How do you make an oval shape in CSS?, How do I create a curved div in CSS?
CSS rounded corners button link
To make rounded coners for we used CSS Style for .button { border: none; color: white; padding: 10px; text-align: center; text-decoration: none; display: inline-block; font-size: 14px; margin: 8px 4px; cursor: pointer; font-weight: bold;}
<!DOCTYPE html>
<html>
<head>
<title>css rounded corners button link - example</title>
<style>
.button {
border: none;
color: white;
padding: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
margin: 8px 4px;
cursor: pointer;
font-weight: bold;
}
.button1 {
background-color: #09C;
border-radius: 4px;
}
.button2 {
background-color: #060;
border-radius: 8px;
}
.button3 {
background-color: #F00;
border-radius: 12px;
}
.button4 {
background-color: #CCC;
border-radius: 16px;
}
.button5 {
background-color: #00F;
border-radius: 50%;
}</style>
<h2>How do you make a button link <br />
</head>
<body>
with rounded corners?</h2>
<p>Rounded corners to a button link with border-radius property:</b></p>
<p>
<a class="button button1" href="https://www.agernic.com">
Agernic tutorial</a>
<a class="button button2" href="https://www.agernic.com">
Agernic tutorial</a>
<a class="button button3" href="https://www.agernic.com">
Agernic tutorial</a>
<a class="button button4" href="https://www.agernic.com">
Agernic tutorial</a>
<a class="button button5" href="https://www.agernic.com">
Agernic tutorial</a>
</p>
</body>
</html>
Round buttons with shadow effect
Webmasters often use the CSS box-shadow property to improve the design of a web page to add a shadow effect around an element's frame.
<!DOCTYPE html>
<html>
<head>
<title>css rounded corners button link shadow - example</title>
<style>
.button {
border: none;
color: white;
padding: 10px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 14px;
margin: 8px 4px;
cursor: pointer;
font-weight: bold;
box-shadow: 10px 5px 5px gray;
}.button1 {
background-color: #09C;
border-radius: 4px;
}
.button2 {
background-color: #060;
border-radius: 8px;
}
.button3 {
background-color: #F00;
border-radius: 12px;
}
.button4 {
background-color: #CCC;
border-radius: 16px;
}
.button5 {
background-color: #00F;
border-radius: 50%;
}</style>
</head>
<body><h2>How do you make a button shadow link <br />
with rounded corners?</h2>
<p>Rounded corners shadow to a button link with border-radius property:</b></p>
<p>
<a class="button button1" href="https://www.agernic.com">
Agernic tutorial</a>
<a class="button button2" href="https://www.agernic.com">
Agernic tutorial</a>
<a class="button button3" href="https://www.agernic.com">
Agernic tutorial</a>
<a class="button button4" href="https://www.agernic.com">
Agernic tutorial</a>
<a class="button button5" href="https://www.agernic.com">
Agernic tutorial</a>
</p>
</body>
</html>
link example, gradient, shadow, generator bootstrap
CSS rounded corners button - css tutorial
This tool makes it easy to create, adjust, and experiment with custom colors for the web.

Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.

Find here examples of creative and unique website layouts.

Find here examples of creative and unique website CSS HTML menu.