在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 送给学长毕业祝福语简短