HTML DOM 样式 borderBottomRightRadius 属性
htmlweb developmentfront end technology更新于 2024/5/18 7:40:17
borderBottomRightRadius 属性用于为元素的右下边框添加圆角或获取其尺寸。
语法
以下是语法 −
获取 borderBottomRightRadius 属性 −
object.style.borderBottomRightRadius = "length|% [length|%]|initial|inherit"
属性值解释如下 −
值
| Sr.No | 值 &说明 |
|---|---|
| 1 | length 用于定义右下角的形状 |
| 2 | % 用于定义右下角形状的百分比。 |
| 3 | initial 用于将此属性设置为初始值。 |
| 4 | inherit 继承父级属性值 |
示例
我们来看一个 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 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

