CSS - border-bottom-right-radius 屬性



CSS border-bottom-right-radius 屬性控制元素邊框右下角的圓角。

語法

border-bottom-right-radius: length | % [length | %] | initial | inherit;

屬性值

描述
長度 它使用長度值定義右下角圓角的大小。預設值為 0。
百分比 它使用百分比值定義右下角圓角的大小。
初始 這將屬性設定為其預設值。
繼承 這從父元素繼承屬性。

CSS 邊框右下角圓角屬性示例

以下示例使用不同的值說明了 border-bottom-right-radius 屬性。

使用長度值的邊框右下角圓角

要設定右下邊框的圓角,我們可以使用長度值指定半徑。在以下示例中,80px 半徑已與 border-bottom-right-radius 屬性一起使用。

示例

<!DOCTYPE html>
<html>

<head>
   <style>
      .rounded-border {
         border: 3px solid black;
         border-bottom-right-radius: 80px;
         width: 200px;
         height: 200px;
      }
   </style>
</head>

<body>
   <h2>
      CSS border-bottom-right-radius property
   </h2>
   <div class="rounded-border">
      This shows the border-bottom-right-radius property 
      with 80px radius.
   </div>
</body>

</html>

使用百分比值的邊框右下角圓角

要設定右下邊框的圓角,我們可以使用百分比值指定半徑。在以下示例中,30% 半徑已與 border-bottom-right-radius 屬性一起使用。

示例

<!DOCTYPE html>
<html>

<head>
   <style>
      .rounded-border {
         border: 3px solid black;
         border-bottom-right-radius: 30%;
         width: 200px;
         height: 200px;
      }
   </style>
</head>

<body>
   <h2>
      CSS border-bottom-right-radius property
   </h2>
   <div class="rounded-border">
      This shows the border-bottom-right-radius property 
      with 30% radius.
   </div>
</body>

</html>

使用兩個值的邊框右下角圓角

要設定右下邊框的圓角,我們可以使用一個或兩個值。單個值會統一影響半徑,而兩個值則分別設定水平和垂直半徑。以下示例顯示了差異。

示例

<!DOCTYPE html>
<html>

<head>
   <style>
      .single-value {
         border: 3px solid black;
         border-bottom-right-radius: 60px;
         width: 200px;
         height: 200px;
      }

      .double-value {
         border: 3px solid black;
         border-bottom-right-radius: 60px 10px;
         width: 200px;
         height: 200px;
      }
   </style>
</head>

<body>
   <h2>
      CSS border-bottom-right-radius property
   </h2>
   <p class="single-value">
      This shows the border-bottom-right-radius property 
      with single value.
   </p>
   <p class="double-value">
      This shows the border-bottom-right-radius property 
      with two values.
   </p>
</body>

</html>

支援的瀏覽器

屬性 Chrome Edge Firefox Safari Opera
border-bottom-right-radius 5.0 9.0 4.0 5.0 10.5
css_properties_reference.htm
廣告