gpt4 book ai didi

css - 如何使两个重叠的列响应

转载 作者:太空宇宙 更新时间:2023-11-04 09:44:29 24 4
gpt4 key购买 nike

大家好,你们能帮我创建一个我在 Photoshop 中制作的设计吗?我实际上使用 col-md-6 将其设为两列。但问题是在 div 高度上制作比另一个高一点。这是我正在谈论的图像

<div class="col-md-6" class="white">
<h1>LOGISTIC</h1>
</div>
<div class="col-md-6" class="ship">
</div>
<div class="col-md-6" class="black">
<h1>DELIVERY</h1>
</div>
<div class="col-md-6" class="pipe">
</div>
<div class="col-md-6" class="white">
<h1>STORAGE</h1>
</div>
<div class="col-md-6" class="tank">
</div>

CSS

.ship{
background: url(../img/resources/ship.png);
}

.tank{
background: url(../img/resources/tank.png);
}

.pipe{
background: url(../img/resources/pipe.png);
}

请帮忙,我这里有货,提前致谢

最佳答案

确保在下面的所有类中指定高度:

.ship{
height: /*set the height of ship.png*/
background-image: url(../img/resources/ship.png);
}

.tank{
height: /*set the height of tank.png*/
background-image: url(../img/resources/tank.png);
}

.pipe{
height: /*set the height of pipe.png*/
background-image: url(../img/resources/pipe.png);
}

关于css - 如何使两个重叠的列响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39594938/

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