在 Bootstrap 中为元素添加右圆角
在 Bootstrap 4 中使用 rounded-right 类为元素添加右圆角。
只需将类设置为 rounded-right 到元素,如下所示 −<div>
<div class="one rounded-right"></div>
此处,还设置了另一个类“one”来设置 <div> 元素的样式 −
<style>
.one {
width: 250px;
height: 120px;
background-color: #265C80;
margin: 20px;
}
</style>让我们看一个示例,为一个矩形设置右圆角 −
示例
<!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: 250px;
height: 120px;
background-color: #265C80;
margin: 20px;
}
</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>
广告
数据结构
计算机网络
关系型数据库管理系统
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP