HTML5用带标题的图像环绕图像 [英] HTML5 wrap text around image with caption
本文介绍了HTML5用带标题的图像环绕图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用图片标题在图片周围换行文字。
How do i wrap text around an image with image caption.
我按以下方式做了,但标题不正确。
i did in the following way, but the caption not coming properly.
<html>
<head>
<style>
.textWrap{
float:left;
margin:10px;
}
.textWrap p{
padding-top:3px;
}
</style>
</head>
<body>
<figure>
<img class="textWrap" src="img/index.jpg" />
<figcaption>Caption goes here</figcaption>
</figure>
<h6>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at ante. Mauris eleifend, quam a vulputate dictum, massa quam dapibus leo, eget vulputate orci purus ut lorem.
</h6>
</body>
</html>
推荐答案
我想你要漂浮整个'人物'元素左,而不是.textWrap图像:
I think you want to float the entire 'figure' element left, not the .textWrap image:
figure {
float: left;
margin: 10px 10px 10px 0;
}
这篇关于HTML5用带标题的图像环绕图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文