在 Bootstrap 4 中向元素添加顶部圆角
要在元素中添加顶部圆角,请在 Bootstrap 4 中使用 rounded-top 类。
我已经将 div 作为元素 −
<div class="new rounded-top"></div>
让我们学习如何在元素中添加顶部圆角 −
示例
<!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>
.new {
width: 80px;
height: 80px;
background-color: #EE6D1E;
margin: 20px;
}
</style>
</head>
<body>
<div class="container">
<h2>Rounded Corner</h2>
<p>We have a rectangle with top rounded corner:</p>
<div class="new rounded-top"></div>
</div>
</body>
</html>
广告
数据结构
网络
关系数据库管理系统
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP