css rounded corners at top only
border-radius: 10px 10px 0 0;
// top-left top-right bottom-right bottom-left.
css rounded corners at top only
border-radius: 10px 10px 0 0;
// top-left top-right bottom-right bottom-left.
border radius css
/* Radius is set for all 4 sides */
border-radius: 10px;
/* top-left-and-bottom-right | top-right-and-bottom-left */
border-radius: 10px 5%;
/* top-left | top-right-and-bottom-left | bottom-right */
border-radius: 2px 4px 2px;
/* top-left | top-right | bottom-right | bottom-left */
border-radius: 1px 0 3px 4px;
/* The syntax of the second radius allows one to four values */
/* first radius / radius */
border-radius: 10px / 20px;
/* first radius => corner point to left or right side*/
/* second radius => corner point to top or bottom side*/
/* radius => corner point to both sides*/
css border-radius
.my-div{
border: 2px solid #f00;
border-radius: 50%;
/* Specific Radius For Specific Border Side*/
border-top-left-radius: 10px;
border-top-right-radius: 10px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
/*
ShortHand
**border-radius: 5px 6px 7px 8px
5px => for top-left-radius
6px => for top-right-radius
7px => for bottom-left-radius
8px => for bottom-right-radius
**border-radius: 10px 20px
10px => for top-left and top-right radius
20px => for bottom-left and bottom-right radius
*/
}
css border radius
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
border radius css
border-radius: 5px; /* The corners will be round */
The border-radius Property
<!DOCTYPE html>
<html>
<head>
<style>
#rcorners1 {
border-radius: 25px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners2 {
border-radius: 25px;
border: 2px solid #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners3 {
border-radius: 25px;
background: url(paper.gif);
background-position: left top;
background-repeat: repeat;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
<h1>The border-radius Property</h1>
<p>Rounded corners for an element with a specified background color:</p>
<p id="rcorners1">Rounded corners!</p>
<p>Rounded corners for an element with a border:</p>
<p id="rcorners2">Rounded corners!</p>
<p>Rounded corners for an element with a background image:</p>
<p id="rcorners3">Rounded corners!</p>
</body>
</html>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us