iphone safari http 地址分词

发布于 2024-07-22 03:47:37 字数 456 浏览 2 评论 0原文

有没有办法在 iphone safari 中“断字”长的 http 地址?

目前有一个很长的http地址: IE http://long/website/address/to/be/displayed/ on/iphone/safari

safari 会将其呈现在一行中,从而影响用户现在必须水平滚动的页面和其他内容。

有没有办法让 safari 显示:

http://long/website/address/to/
be/displayed/on/iphone/safari

也许css关键字类似于IE中的word-break?

is there a way to "word break" a long http address in iphone safari?

Currently with a long http address:
i.e.
http://long/website/address/to/be/displayed/on/iphone/safari

safari will render it in one line, thus affecting the page and the other contents where user has to scroll horizontally now.

is there a way for safari to display:

http://long/website/address/to/
be/displayed/on/iphone/safari

?

Maybe css keyword similar to word-break in IE?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

傲鸠 2024-07-29 03:47:37

在每个 / 之后添加“头发空间”。 头发空间在屏幕上不可见,但可以并且将被 Safari 用作潜在的包裹点。 最终效果正是您所要求的。

为此:

1) 您的页面必须被解释为 UTF-8 字符集。

2)将每个/改为/&x200A; -- 这样,中断将在 / 之后。 对所有 / 进行替换。 Safari 会选择最好的进行包装。

请参阅http://www.unicode.org/unicode/reports/tr14 /tr14-17.html 了解更多有关换行符的信息。

拉里

Add in "Hair Spaces" after each /. A hair space will not be visible on the screen, but can and will be used by Safari as potential wrapping points. The net effect is exactly what you asked for.

To do so:

1) Your page must be interpreted as UTF-8 character set.

2) Change every / to be /&x200A; -- that way the break will be after the /. Do the substitution on all of the /'s. Safari will choose the best ones for the wrapping.

See http://www.unicode.org/unicode/reports/tr14/tr14-17.html for more on line breaking characters.

Larry

朱染 2024-07-29 03:47:37

我用
A
{
word-break: 断词;
}
这样浏览器就可以将其分成新行。

I use
a
{
word-break: break-word;
}
so the browser can break it into new line.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文