gpt4 book ai didi

bootstrap-4 - Bootstrap 4 : Placing Cards side by side?

转载 作者:行者123 更新时间:2023-12-03 20:30:05 25 4
gpt4 key购买 nike

所以我正在使用 bootstrap4。我试图将一张卡片放在另外两张堆叠在一起的卡片的左侧,最左边的卡片的固定长度是其他两张卡片的总长度......但我可以'不知道如何做到这一点。

<div class="card w-20">
<blockquote class="blockquote card-body">
<p>This card on the left of the other two cards, with a fixed height and scrolling.</p>
<footer class="blockquote-footer">
<small class="text-muted">
Someone famous in <cite title="Source Title">Source Title</cite>
</small>
</footer>
</blockquote>
</div>
<div class="card w-75">
<div class="card-body">
<h5 class="card-title">How do you want to ask the question?</h5>
<p class="card-text">Enter the information below.</p>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">Description</span>
</div>
<textarea class="form-control" aria-label="With textarea"></textarea>
</div>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">Supplemental Methods</span>
</div>
<button type="button" class="btn btn-outline-dark m-3">Text</button>
<button type="button" class="btn btn-outline-dark m-3">Audio</button>
<button type="button" class="btn btn-outline-dark m-3">Video</button>
<button type="button" class="btn btn-outline-dark m-3">Image</button>
</div>
<button type="button" class="btn btn-outline-dark m-3 float-right">Next</button>
</div>
</div>
<div class="card w-75">
<div class="card-body">
<h5 class="card-title">How should students ask the question?</h5>
<p class="card-text">Enter the information below.</p>
<div class="input-group text-center">
<button type="button" class="btn btn-outline-dark m-3">Audio</button>
<button type="button" class="btn btn-outline-dark m-3">Video</button>
<button type="button" class="btn btn-outline-dark m-3">Short Answer</button>
<button type="button" class="btn btn-outline-dark m-3">Sorting</button>
</div>
<div class="input-group mx-auto">
<button type="button" class="btn btn-outline-dark m-3">T/F</button>
<button type="button" class="btn btn-outline-dark m-3">Matching</button>
<button type="button" class="btn btn-outline-dark m-3">Label</button>
<button type="button" class="btn btn-outline-dark m-3">Multiple Choice</button>
</div>
<button type="button" class="btn btn-outline-dark m-3 float-right">Next</button>
</div>
</div>

最佳答案

对于这种布局,您应该使用网格,而不是实用程序类:

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<div class="container">
<div class="row">
<div class="col col-md-3">
<div class="card h-100">
<p class="card-body">This card on the left of the other two cards, with a fixed height and scrolling.</p>
</div>
</div>
<div class="col col-md-9">
<div class="card">
<p class="card-body">How do you want to ask the question?<p>
</div>
<div class="card">
<p class="card-body">How should students ask the question?</p>
</div>
</div>
</div>
</div>

关于bootstrap-4 - Bootstrap 4 : Placing Cards side by side?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50501186/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com