html - HTML anchor 标记中超链接文本的内联换行

我正在尝试找到一种方法,让 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/

相关文章:

git - 如何为 git diff 中使用的寻呼机设置标签大小?

iphone - 具有默认时区的 NSDateFormatter 给出的日期与 NSDate 描述方

excel - 即使第一个数字是 0 vba,也将数字格式化为两位数

excel - 我可以仅使用 excel 的图表格式在月桶中显示每日数据吗?

php - Aptana PHP Formatter - 使用自定义格式规则

excel - 创建数据透视表时日期值的排序问题

c++ - 我可以给出一个流来在 C++ 中的数字上打印前导零的指令是什么?

c - 如何将 unsigned int 格式化为 8 位十六进制数?

c# - 我应该使用什么页面图像生成技术?

xml - 在 Scala 中生成格式化的 XML