我使用 imageFlow 作为基础。但我的问题是我想在图像顶部显示文本,但 JS 文件不接受 img 标签周围的任何 div。
<img src="" alt="" >
如果图像 src 无法显示,有什么方法可以显示替代图像。
您可以执行以下操作
<div style="background: transparent url("tempballoon.png") no-repeat left top; font-size: 32px;width: 100%; height: height:[height of image]">
Test
</div>
或者可以按照此链接中给出的方式构建
<img src="" alt="" style="postion:relative;">
<div style="postion:absolute;">Your image alt text</div>
根据要显示文本的位置设置 div 的顶部、左侧、底部和右侧位置。