Bootstrap 4 .rounded-bottom 類


如要設定一個元素具有圓角,在 Bootstrap 4 中使用 rounded-bottom 類。

設定 rounded-bottom 類 −

<div class="demo rounded-bottom"></div>

在上面 <div> 中,我還設定了另一個類來設定元素樣式 −

.demo {
  width: 100px;
  height: 120px;
  margin: 10px;
  background-color: orange;
}

你可以嘗試執行以下程式碼來實現 rounded-bottom 類 −

示例

線上演示

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Bootstrap Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>
    <style>
    .demo {
      width: 100px;
      height: 120px;
      margin: 10px;
      background-color: orange;
    }
    </style>
  </head>
  <body>
    <div class="container">
      <h2>Rectangles</h2>
      <p>We have two rectangles with rounded corners (bottom):</p>
      <div class="demo rounded-bottom"></div>
      <div class="demo rounded-bottom"></div>
    </div>
  </body>
</html>

更新於:2020 年 6 月 18 日

285 次瀏覽

開始你的 職業生涯

完成課程並獲得認證

開始學習
廣告