Bootstrap 5垂直规则宽度不工作

yquaqz18  于 12个月前  发布在  Bootstrap
关注(0)|答案(1)|浏览(133)

我有一个包含两列的bootstrap行,我想在它们之间添加一个垂直分隔符。

<!DOCTYPE html>
<html>
<head>
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-0evHe/X+R7YkIZDRvuzKMRqM+OrBnVFBL6DOitfPri4tjfHxaWutUpFmBp4vmVor" crossorigin="anonymous">
<title>Page Title</title>
</head>
<body>

<div class="row">
    <div class="col">
        <input type="text" class="form-control" placeholder="First name" aria-label="First name">
    </div>
    <div class="vr"></div>
    <div class="col">
        <input type="text" class="form-control" placeholder="Last name" aria-label="Last name">
    </div>
</div>

<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-pprn3073KE6tl6bjs2QrFaJGz5/SUsLqktiwsUTF55Jfv3qYSDhgCecCxMW52nD2" crossorigin="anonymous"></script>
</body>
</html>

字符串

hxzsmxv2

hxzsmxv21#

我今天遇到了同样的问题。我通过从vr元素中删除填充来解决它

<div class="vr p-0" ></div>

字符串

相关问题