我在 4 段的最后有一个链接。就像是:
Here is my text, and it's just an example of text to show
And I am wanting to wrap the last bit of text, which happens
to be a link, but I need the link to either stay on the line
that is the available width and not break to another line,
unless it can't fit left-aligned on that line like this
http://mylink.com
因此,在 HTML 中的实际代码如下:
<p>Here is my text, and it's just an example of text to show
And I am wanting to wrap the last bit of text, which happens
to be a link, but I need the link to either stay on the line
that is the available width and not break to another line,
unless it can't fit left-aligned on that line like this<br />
<a href="http://mylink.com">http://mylink.com</a></p>
我在<br />
这里使用,但我不想使用<br />
,因为屏幕会捕获实际显示的文本量,有时它可能看起来像这样:
Here is my text, and it's just an example of text to show And I am wanting to wrap
the last bit of text, which happens to be a link, but I need the link to either stay
on the line that is the available width and not break to another line, unless it can't
fit left-aligned on that line like this
http://mylink.com
因此,在上述情况下,我需要它不使用<br />
标签来分解它,而应该像这样呈现:
Here is my text, and it's just an example of text to show And I am wanting to wrap
the last bit of text, which happens to be a link, but I need the link to either stay
on the line that is the available width and not break to another line, unless it can't
fit left-aligned on that line like this http://mylink.com
这可以通过 CSS 实现吗?也许一些text-align
价值,或者为了在完全不使用<br />
标签的情况下完成这一点而做的其他事情?但是,如果链接可以自然地放在行上,那么它不应该向下移动到下一行。相反,它应该保持在那条线上。
谢谢!