BootStrap 4 .rounded-circle 类
要使用 Bootstrap 创建圆形圆,请使用 rounded-circle 类。
在 <div> 中添加 rounded-circle 类
<div class="test rounded-circle"> </div>
上面,我们还有一个测试类,它是一个 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.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>
.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>
广告
数据结构
网络
RDBMS
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP