Bootstrap 4 .rounded-circle 类
bootstrapweb developmentcss framework
要使用 Bootstrap 创建圆角圆形,请使用 rounded-circle 类。
在 <div> 中添加 rounded-circle 类
<div class="test rounded-circle> </div>
上面还有一个 test 类,它是一个用于设置圆形样式的 CSS 类 −
.test {
width: 270px;
height: 320px;
background-color: yellow;
}
您可以尝试运行以下代码来实现 Bootstrap 4 中的 rounded-circle 类 −
示例
<!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>
.test {
width: 350px;
height: 320px;
background-color: yellow;
}
</style>
</head>
<body>
<div class="container">
<h2>Circle</h2>
<p>We have a circle below:</p>
<div class="test rounded-circle"></div>
</div>
</body>
</html>

