gpt4 book ai didi

html - 即使在使用 style1 后图像对齐也不起作用

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

图像没有对齐,应该有接近图像的标签,但它不能正常工作

<style>
label{
color:red;
font-family: "Times New Roman";
font-size: 25px;
}
label.desc{
color:blue;
font-family: "Times New Roman";
font-size: 12px;
position: relative;
left: -20px;

}
img{
float:left;
width:300;
height:300;

}
</style>

最佳答案

像这样将每张图片和相应的标签放在一个 div 中:

<div id="a">
<image src="http://upload.wikimedia.org/wikipedia/commons/3/38/Heart.gif"/>
<label>1<label>
<label>2<label>
<label>3<label>
</div>

并赋予该 div 宽度:

#a{
width: 260px;
}

关于html - 即使在使用 style1 后图像对齐也不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24378418/

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