正如你在这个截图中看到的,当添加按钮时,文本变得垂直不对齐(略高)。我如何避免这种情况?(Bootstrap 5)
的数据
代码如下:
<div class="container-fluid">
<div class="row">
<h2 class="border-bottom border-dark pt-4">Roles</h2>
</div>
<div class="card">
<div class="card-header">
<b>Roles</b>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex justify-content-between">Admins
<button class="btn btn-sm btn-outline-secondary" type="button">View</button>
</li>
<li class="list-group-item d-flex justify-content-between">Custom
<button class="btn btn-sm btn-outline-secondary" type="button">Edit</button>
</li>
</ul>
</div>
</div>
字符串
编辑:我也应该包括文本在一个跨度内的李为好的措施
1条答案
按热度按时间jhdbpxl91#
将类
align-items-center
添加到每个li
字符串