我现在真的得想办法了。我希望一张图片填满我的 col-6。但是我怎么知道图片的尺寸应该有多大呢?我也应该设置一个高度吗?
<div class="row">
<div class="col col-6">
<img src="img/fly_tying.jpg">
</div>
<div class="col col-6">
<form action="flyUpload.php">
<fieldset>
<legend>Upluad Fly</legend>
<label for="name">Name</label>
<input type="text" id="name" value="name"><br>
<label for="category">Category</label>
<input type="text" id="category" value="category"><br>
<label for="fishtype">Fishtype<label>
<input type="text" id="fishtype" value="fishtype"><br>
<button type="submit" value="submitFly">Submit My Fly</button>
</fieldset>
</form>
</div>
</div>
CSS:
.col-6{
width:50%;
}
最佳答案
高度只是设置自动。并使 img 设置宽度 100%
关于html - 图片填写所有col,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36682932/