从Bootstrap 4中的元素删除顶部边框
使用border-top-0类可删除元素的顶部边框。
设置类,就像我们将其他任何类添加到元素中一样:
<div class="mystyle border border-top-0"> Top border is missing </div>
上面,我已将<div>作为我们的元素。还添加了另一个类“mystyle”,为我们的div设置样式-
.mystyle {
width: 350px;
height: 170px;
margin: 10px;
}您可以尝试运行以下代码以在Bootstrap4中使用border-top-0类-
示例
<!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>
.mystyle {
width: 350px;
height: 170px;
margin: 10px;
}
</style>
</head>
<body>
<div class="container">
<h2>Rectangle</h2>
<div class="mystyle border border-top-0">Top border is missing</div>
</div>
</body>
</html>热门推荐
10 新年门口花束祝福语简短
11 盘锦结婚祝福语大全简短
12 父母生日祝福语 简短独特
13 家庭恩爱祝福语简短英文
14 高考俄语祝福语大全简短
15 虎年祝福语 诗句唯美简短
16 生日婚礼祝福语简短精辟
17 虎年喝酒拜年祝福语简短
18 教师闺蜜祝福语简短