我有兩張圖片,一張應該全部浮在視口的左邊,一張浮在右邊。我曾經作業過,但現在不行了,你可以看到它在右邊的圖片上創造了一個奇怪的空間。不知道為什么會這樣,bootstrap的容器是流動的,所以它應該像左邊的一樣一直橫跨。
。 .container-fluid{
overflow: hidden;
}
<div class="container-fluid"> /span>
<div class=" row">
<div class="col-lg-6"/span>>
<img src="images/leftHands。 png" class="img-fluid" alt="left-hand"> alt="lft-hand" "lift-hand"
</div>/span>
<div class="col-lg-6">
<img src="images/rightHands. png" class="img-fluid" alt="right-hand"> alt=
</div>/span>
</div>/span>
</div>/span>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" class="snippet-box-edit snippet-box-result" frameborder="0"></iframe>
我安裝了最新的bootstrap,到現在為止沒有任何問題。
uj5u.com熱心網友回復:
這是因為有2個因素。col-lg-6和你的img尺寸。你可以通過兩種方式來解決這個問題,這取決于你的需求,你可以改變容器的大小或者改變img的大小來適應容器。如果你決定選擇后者,試著將容器的高度和寬度設定為100%,看看它是否能拉伸到適合所有容器的尺寸。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/309203.html
標籤:
上一篇:在代碼空間中預先配置容器注冊表


