ជាមួយនឹង property border-radius យើងអាចជ្រើសរើសយក element ផ្សេងៗមកកែច្នៃអោយមានជ្រុងរាងមូលបានតាមសេចក្តីត្រូវការ។
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Rounded Corner</title>
<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>
The border-radius Property
Rounded corners for an element with a specified background color:
Rounded corners!
Rounded corners for an element with a border:
Rounded corners!
Rounded corners for an element with a background image:
Rounded corners!
</body>
</html>
The border-radius Property
Rounded corners for an element with a specified background color:
Rounded corners!
Rounded corners for an element with a border:
Rounded corners!
Rounded corners for an element with a background image:
Rounded corners!
ក្នុងករណីយើងចង់កែច្នៃរចនា element ទាំងឡាយអោយមានជ្រុងមានរាងមូលខុសៗគ្នា យើងត្រូវធ្វើដូចខាងក្រោមនេះ៖
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Rounded Corner</title>
<style>
#rcorners1 {
border-radius: 15px 50px 30px 5px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners2 {
border-radius: 15px 50px 30px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners3 {
border-radius: 15px 50px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
#rcorners4 {
border-radius: 15px;
background: #73AD21;
padding: 20px;
width: 200px;
height: 150px;
}
</style>
</head>
<body>
The border-radius Property
Four values - border-radius: 15px 50px 30px 5px:
Three values - border-radius: 15px 50px 30px:
Two values - border-radius: 15px 50px:
One value - border-radius: 15px:
</body>
</html>
The border-radius Property
Four values - border-radius: 15px 50px 30px 5px:
Three values - border-radius: 15px 50px 30px:
Two values - border-radius: 15px 50px:
One value - border-radius: 15px:














