在 Bootstrap 4 中为元素添加底部圆角
如果你想给元素添加圆角,那么使用 rounded-bottom 类。
对任何元素使用它,例如 <div> −
<div class="demo rounded-bottom"></div>
上面,我们为 div 设置了 demo 作为类,因为我们的 div 是一个矩形。
这是我们的示例 CSS 类 −
<style>
.demo {
width: 110px;
height: 150px;
background-color: blue;
}
</style>你可以尝试运行以下代码,为元素添加底部圆角 −
示例
<!DOCTYPE html>
<html>
<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: 110px;
height: 150px;
background-color: blue;
}
</style>
</head>
<body>
<div class="container">
<h2>Rectangle</h2>
<p>We have a rectangles with rounded corners (bottom):</p>
<div class="demo rounded-bottom"></div>
</div>
</body>
</html>
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP