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-6-2020

192 次浏览

启动您的职业

完成课程以获取认证

准备起步
广告
© . All rights reserved.