Computer >> คอมพิวเตอร์ >  >> การเขียนโปรแกรม >> HTML

HTML DOM สไตล์ borderBottomRightRadius คุณสมบัติ


คุณสมบัติ borderBottomRightRadius ใช้สำหรับเพิ่มมุมโค้งมนที่ขอบด้านล่างขวาขององค์ประกอบหรือรับการวัด

ไวยากรณ์

ต่อไปนี้เป็นไวยากรณ์สำหรับ −

รับคุณสมบัติ borderBottomRightRadius -

object.style.borderBottomRightRadius = "length|% [length|%]|initial|inherit"

ค่าคุณสมบัติอธิบายได้ดังนี้ -

คุณค่า

Sr.No ค่า &คำอธิบาย
1 ความยาว
สำหรับกำหนดรูปทรงมุมขวาล่าง
2 %
สำหรับกำหนดรูปร่างมุมล่างขวาเป็นเปอร์เซ็นต์
3 เริ่มต้น
สำหรับการตั้งค่าคุณสมบัตินี้เป็นค่าเริ่มต้น
4 สืบทอด
เพื่อสืบทอดค่าคุณสมบัติหลัก

ตัวอย่าง

ให้เราดูตัวอย่างสำหรับคุณสมบัติ borderBottomRightRadius -

<!DOCTYPE html>
<html>
<head>
<style>
   #DIV1{
      height: 100px;
      width: 200px;
      border: 10px groove orange;
      padding: 10px;
      border-bottom-right-radius: 240px 90px;
   }
</style>
<script>
   function changeBottomBorder(){
      document.getElementById("DIV1").style.borderBottomRightRadius="90px 50px";
      document.getElementById("Sample").innerHTML="The bottom border right radius is now decreased";
   }
</script>
</head>
<body>
<div id="DIV1">SOME SAMPLE TEXT</div>
<p>Change the above image bottom right border size by clicking the below button</p>
<button onclick="changeBottomBorder()">Change Bottom Border</button>
<p id="Sample"></p>
</body>
</html>

ผลลัพธ์

สิ่งนี้จะสร้างผลลัพธ์ต่อไปนี้ -

HTML DOM สไตล์ borderBottomRightRadius คุณสมบัติ

เมื่อคลิกปุ่ม "เปลี่ยนขอบด้านล่าง" -

HTML DOM สไตล์ borderBottomRightRadius คุณสมบัติ