小码哥的IT人生

Style borderBottomRightRadius 属性 详解

css3基础 2023-07-30 01:19:05小码哥的IT人生shichen

Style borderBottomRightRadius 属性

定义和用法

borderBottomRightRadius 属性设置或返回右下角边框的形状。

提示:此属性允许您为元素添加圆角边框!

另请参阅:

CSS 参考手册:border-bottom-right-radius 属性

实例

在 div 元素的右下角添加圆角边框:

document.getElementById("myDIV").style.borderBottomRightRadius = "25px";

 

完整实例【亲自试一试】:

<!DOCTYPE html>
<html>
<head>
<style>
#myDIV {
  border: 1px solid black;
  width: 300px;
  height: 300px;
}
</style>
</head>
<body>
<p>点击“试一试”按钮可更改 DIV 元素的 border-bottom-right-radius 属性:</p>
<button onclick="myFunction()">试一试</button>
<div id="myDIV">
  <h1>Hello</h1>
</div>
<script>
function myFunction() {
  document.getElementById("myDIV").style.borderBottomRightRadius = "25px";
}
</script>
</body>
</html>

可以使用本站在线JavaScript测试工具测试上述代码运行效果:http://www.phpcodeweb.com/runjs.html

语法

返回 borderBottomRightRadius 属性:

object.style.borderBottomRightRadius

设置 borderBottomRightRadius 属性:

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

属性值

描述
length 定义右下角的形状。默认值为 0。
% 以 % 定义右下角的形状。
initial 将此属性设置为其默认值。请参阅 initial
inherit 从其父元素继承此属性。请参阅 inherit

技术细节

默认值: 0
返回值: 字符串,表示元素的 border-bottom-right-radius 属性
CSS 版本: CSS3

浏览器支持

表中的数字注明了首个完全支持该属性的浏览器版本。

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
5.0 9.0 4.0 5.0 10.5

版权所有 © 小码哥的IT人生
Copyright © phpcodeweb All Rights Reserved
ICP备案号:苏ICP备17019232号-2  

苏公网安备 32030202000762号

© 2021-2024