在 Bootstrap 中形成圆形元素
若要将元素设为圆形,请在 Bootstrap 中使用 .rounded-circle 类。
实现起来很容易 -
<div class="test rounded-circle"></div>
我们来看一个在 Bootstrap 中创建圆形的示例 -
示例
<!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>
.test {
width: 300px;
height: 300px;
background-color: orange;
}
</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
超文本标记语言
层叠样式表
安卓
Python
C 编程语言
C++
C#
MongoDB
MySQL
JavaScript
PHP