在Bootstrap 4中将元素与父对象的基线对齐
在Bootstrap4中使用align-baseline类将元素与父元素的基线对齐。
像下面的代码片段一样设置align-baselinec类-
<span class="align-baseline">
现在在其中添加内容-
<span class="align-baseline"> Demo Baseline </span>
您可以尝试运行以下代码以使元素与父级的基线对齐-
示例
<!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>
</head>
<body>
<div class="container">
<h2>Example</h2>
<p>This is demo text<p>
<span class="align-baseline">Demo Baseline</span>
</div>
</body>
</html>热门推荐
10 圣诞简短祝福语给父母
11 新年祝福语简短句子
12 同事调动的祝福语简短
13 祝福语勤奋大全简短英语
14 老师高考后祝福语 简短
15 离别祝福语简短送同事
16 表达家人的祝福语简短
17 关云生字祝福语简短
18 新年的好祝福语简短