Bootstrap 4 .border-dark类
要在Bootstrap中为元素设置深色边框,请使用border-dark类。
要使用它是一件容易的事。只需使用类名称作为元素类-
<div class="test border border-dark"> Dark Border </div>
上面也可以看到“测试”类。这对于设置元素的样式很有用-
<style>
.test {
width: 150px;
height: 150px;
margin: 35px;
}
</style>您可以尝试运行以下代码以在Bootstrap4中实现border-dark类-
示例
<!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.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/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: 150px;
height: 150px;
margin: 35px;
}
</style>
</head>
<body>
<div class="container">
<p>Rectangle with dark border:</p>
<div class="test border border-dark">Dark Border</div>
</div>
</body>
</html>热门推荐
10 小学毕业父母简短祝福语
11 幼儿生日祝福语模板简短
12 新娘妈妈的祝福语简短
13 邻居聚会祝福语大全简短
14 十条祝福语简短
15 给同学祝福语的简短
16 过年祝福语简短祝妈妈
17 祝女儿简短祝福语大全
18 恩师诗词祝福语简短大全