iphone safari http 地址分词
有没有办法在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在每个 / 之后添加“头发空间”。 头发空间在屏幕上不可见,但可以并且将被 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
我用
A
{
word-break: 断词;
}
这样浏览器就可以将其分成新行。
I use
a
{
word-break: break-word;
}
so the browser can break it into new line.