图像旁边的浮动内容
我有三个元素:图像、链接和段落,我希望图像左对齐,然后浮动在链接旁边,然后在链接下方浮动段落,但是无论我尝试什么,我似乎只能让链接浮动在我的图像旁边,而文本正好位于图像下方,我怎样才能使该段落也像我的链接一样浮动?
所以它需要看起来像这样,
这是我的小提琴,
I have three elements an image, an link and a paragraph, I am wanting have the the image aligned left, and then floating next to that the link and then underneath the link the paragraph, however whatever I try I seem to only be able to get the link to float next to my image, and text just sits underneath the image, how can I make it so the paragraph also floats like my link?
So it needs to look like this,
Here is my fiddle,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是您想要的 jsfiddle:
http://jsfiddle.net/JjHLa/1/
将其添加到您的 css 中:
修改您的 html,其中文本如下所示(
将类“field”
添加到p 标记
):希望这会有所帮助。
Here is the jsfiddle for what you want:
http://jsfiddle.net/JjHLa/1/
add this to your css:
modify your html where your text goes like this(
add class 'field'
top tag
):Hope this helps.
您应该将链接和文本放在同一个
div
中。然后你可以绝对定位链接/文本,并将它们调整到完美,然后浮动 div。You should put your link and text in the same
div
. Then you could position the link/text absolutely, and adjust them to perfection, and just float the div.