我正在尝试找到一种方法,让 HTML 链接中的超长文本能够换行,同时将链接包含在一个紧凑的矩形中。
基本上,我想要这个:
with a really, really Here is some text long link that wraps and here is some more text. around in a rectangle
代替:
Here is some text with a really, really long link that wraps around in a rectangle and here is some more text.
我该怎么做?
最佳答案
你可以在 Firefox 中这样做 - 但它在 IE 中不起作用:(
<p>Here is some text <a href="#">with a really, really long link that wraps</a> around in a rectangle and here is some more text.
<style type="text/css">
a {display: inline-block; max-width: 100px; vertical-align: middle;}
</style>
关于html - HTML anchor 标记中超链接文本的内联换行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/646657/