HTML DOM 样式 borderBottomLeftRadius 属性

htmlweb developmentfront end technology更新于 2024/5/18 8:12:17

borderBottomLeftRadius 用于为元素的右下边框添加圆角。我们可以设置和获取左下角的边框形状。

语法

以下是语法 −

设置 borderBottomLeftRadius 属性 −

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

值

属性值解释如下 −

Sr.No值 &说明
1length
定义左下角形状
2%
以百分比形式定义左下角形状。
3initial
将此属性设置为初始值。
4inherit
继承父级属性值

示例

我们来看一个 borderBottomLeftRadius 属性的示例 −

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

输出

这将产生以下输出 −

点击"更改底部边框"按钮 −


相关文章


有用资源