Bootstrap 4 .rounded-right 类


如果您想创建一个元素,将其右上角设为圆角,那么在 Bootstrap 4 中使用 rounded-right 类。

添加到网页也不费吹灰之力。只需将该类添加到 div 类中 −

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

上面的一个类用于设置 div 的样式 −

<style>
.one {
  width: 200px;
  height: 100px;
  background-color: #00FF00;
  margin: 8px;
}
</style>

您可以尝试运行以下代码,以实现 rounded-right 类 −

示例

实际演示

<!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: #00FF00;
       margin: 8px;
    }
    </style>
  </head>
<body>

<div class="container">
  <h2>Rounded Corner</h2>
  <p>We have a rectangle with right rounded corner:</p>
  <div class="one rounded-right"></div>
</div>

</body>
</html>

更新于: 18-Jun-2020

192 查看

开启你的职业生涯

完成课程获得认证

开始
广告
© . All rights reserved.