在 Bootstrap 4 中为元素添加底部圆角
bootstrapweb developmentcss framework
如果您想为元素添加圆角,请使用 rounded-bottom 类。
可在任何元素上使用,例如 <div> −
<div class="demo rounded-bottom"></div>
上面,我们也为矩形 div 设置了类 demo。
这是我们的演示 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.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/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>

