gpt4 book ai didi

html - 如何使文本环绕表格,就好像它是图像一样

转载 作者:技术小花猫 更新时间:2023-10-29 11:49:03 24 4
gpt4 key购买 nike

我很惊讶我找不到解决这个问题的方法。我想在我的文档顶部附近放置一个小表格(1 行,3 个单元格),向右对齐,用一个段落环绕它,就像您可以使用以下代码处理图像一样......

    <img src="http://www.sorenwagner.ws/marty/img/ca-seal.jpg"
align="right" width="300" height="100">
This is a paragraph large enough to wrap around the image...
This is a paragraph large enough to wrap around the image...
This is a paragraph large enough to wrap around the image...
This is a paragraph large enough to wrap around the image...

如果能够定义表格周围的填充也很好,这样文本就不会正好到边框。在 CSS 中是否有相对简单的解决方案?

最佳答案

只是float右边的表格(这也是您应该如何定位图像的方式):

<table style="float: right">
<!-- ... -->
</table>
<p>Bunch of text...</p>

演示:http://jsfiddle.net/ambiguous/ZLfg7/1/

关于html - 如何使文本环绕表格,就好像它是图像一样,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10670353/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com