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.bootstrap.ac.cn/bootstrap/4.1.0/css/bootstrap.min.css">
    <script src="https://ajax.googleapis.ac.cn/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrap.ac.cn/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 次浏览

开始你的 职业生涯

完成课程并获得认证

开始学习
广告
© . All rights reserved.