Html 在图像下提供字幕
我需要在每张图片下添加标题。我试着用了标签,也用了标签,但我没能得到想要的结果Html 在图像下提供字幕,html,css,Html,Css,我需要在每张图片下添加标题。我试着用了标签,也用了标签,但我没能得到想要的结果 强文本 像这样吗?运行代码 .text{位置:相对;文本对齐:居中;} .images{显示:内联块;页边距顶部:10px;} 强文本 强文本 希望它能帮助你 HTML <div> <img src='image1.jpg' alt='image1' /> <span class="caption">Caption goes here</span>
强文本
像这样吗?运行代码
.text{位置:相对;文本对齐:居中;}
.images{显示:内联块;页边距顶部:10px;}
强文本
强文本
希望它能帮助你
HTML
<div>
<img src='image1.jpg' alt='image1' />
<span class="caption">Caption goes here</span>
</div>
<div>
<img src='image1.jpg' alt='image1' />
<span class="caption">Caption goes here</span>
</div>
.caption {
display: block;
font-weight: bold;
margin-top: 10px;
}