gpt4 book ai didi

html - 照片和标题布局问题

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

this page显示在狭窄的浏览器窗口中,页面底部的照片标题显示会出现问题,例如

enter image description here

如您所见,标题超出了照片的右侧。理想情况下,我希望照片与标题的宽度相同,但缩小标题以匹配照片的宽度也是可以接受的。

单张照片和标题的标记是

<div class="four columns">
<div class="ft-work">
<img src="images/slider/mum-daughter.jpg">
<div class="ft-work-title text-center">
<h5 class="alt-h">Caption??</h5>
</div>
</div>
</div>

我发现如果我删除这个规则

#featured-work-slider img {
width: auto !important;
}

照片的宽度与标题相符,但图像看起来拉得太长了。

最佳答案

我在你的样式表中看到这条规则:

#featured-work-slider img {
display: inline-block !important;
width: auto !important;
}

将其切换为以下内容对我有用(适用于移动设备和桌面设备尺寸)。

#featured-work-slider img {
display: inline-block !important;
width: 100%;
height: auto;
}

关于html - 照片和标题布局问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23161655/

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