gpt4 book ai didi

html - 不需要的内容落在图像下方

转载 作者:行者123 更新时间:2023-11-28 13:32:09 28 4
gpt4 key购买 nike

我在图片旁边有文字(现在是红色方 block )。当我将窗口设置得非常小时,文本就会出现在图像下方,我不希望这种情况发生。

太好了:

enter image description here

不好:

enter image description here

如何预防?

<div class="entrie">
<img class="entrieImage" src="images/img01.png"/>

<div class="entrieInfo">
<div class="band">Green</div>
<div class="album">...</div>
<div class="label">ATCO</div>
<div class="year">1966</div>
-
<div class="tags">rousseau, green, woodsy, band photo, 12IN, tree, civilization, Atco, 1960's, Fuzz
</div>
</div>

</div>

-

.entrie {
float: left;
margin-bottom: 40px;
position: relative;
}

.entrieInfo {
width: 200px;
float: left;
margin-left: 10px;
margin-right: -45px;
position: relative;
z-index: 2;

}

.entrieImage {
/* if you only set the width then the height will be set automaticly proportional*/
width: 300px;
height: 300px;
float: left;
position: relative;
z-index: 1;
background: red;
}

这里有一个 js fiddle ,便于测试:

http://jsfiddle.net/K4RFU/

最佳答案

您可以在 .entrie 上设置一个足够大以包含其内容的 min-width

关于html - 不需要的内容落在图像下方,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11282561/

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