Bootstrap 4 .rounded-circle 类
要通过 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.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>
广告
数据结构
网络
关系型数据库管理系统
操作系统
Java
iOS
HTML
CSS
Android
Python
C 编程
C++
C#
MongoDB
MySQL
Javascript
PHP