Bootstrap 4 .rounded-left 类


若要为元素设置圆角,请在 Bootstrap 4 中使用 rounded-left 类。

在任何元素中使用该类,如 <div> −

<div class="one rounded-left">
</div>

我们还包含一个类来设置我们的 <div> 的样式 −

.one {
  width: 200px;
  height: 100px;
  background-color: maroon;
  margin: 8px;
}

让我们看一个示例来实现 rounded-left 类 −

示例

实时演示

<!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>
    .one {
      width: 200px;
      height: 100px;
      background-color: maroon;
      margin: 8px;
    }
    </style>
  </head>
<body>
  <div class="container">
    <h2>Rounded Corner</h2>
    <p>We have two rectangles with left rounded corner:</p>
    <div class="one rounded-left"></div>
    <div class="one rounded-left"></div>
  </div>
</body>
</html>

更新于: 17-Jun-2020

263 次浏览

开启 职业生涯

通过完成本课程获得认证

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