html - HTML 中的照片和文本
问题描述
我试图在照片旁边放一些文字,我希望这些文字在图像下方流动。我使用了图形标签和figcaption标签,但它不起作用。
<figure>
<img class="row2" src="http://placekitten.com/150/150">
<figcaption class="text">Email filtering is the processing of email to organize it according to specified criteria. </figcaption>
</figure>
解决方案
如果您只是希望您的标题与图像大小相同并位于其下方。给一个宽度figure
figure{
width: 300px;
}
img{
max-width: 100%;
display: block;
}
<figure>
<img class="row2" src="http://placekitten.com/450/450">
<figcaption class="text">Email filtering is the processing of email to organize it according to specified criteria. </figcaption>
</figure>
推荐阅读
- excel - 如何使用 VBA 从单元格中获取一些字符
- java - 运行多个线程的多个处理器 - 可变关键字 Java
- azure - Azure 函数中的超时错误(使用 Visual Studio)
- python - Python中矢量化代码和天真的循环代码之间的不同结果
- python-3.x - Matplotlib 动画:如何擦除以前绘制的点?
- ios - 在组合 iOS 中获取我的订阅取消状态
- amazon-s3 - 如何通过云端压缩图像/jpeg?
- reporting-services - SSRS - 矩阵中不必要的列
- javascript - 如何在快速会话中使用 cookie - connect.sid 将很快被拒绝
- c++ - lambda 函数没有显示正确的结果