我正在尝试在移动设备上创建页面显示。它的布局是这样的:
/---------\ some text around
| | the image. some
| image | text around the
| | image. some text
\---------/ around the image.
some word around the image.
some word around the image.
我使用浮动样式来实现:
<div style="word-wrap: break-word; word-break: break-all;">
<img src="someimg.jpg" style="float: left;"/>
some text around the image. some text around the image. ...
</div>
但是,如果单词长于右侧区域最大长度但短于整个 div,则它不会被破坏,而只是移动到图像下方。
/---------\ some text around
| | the image.
| image |
| |
\---------/
a-word-longer-than-right will
not be break and just display
below the image while a-word-
longer-than-the-whole-area-wi
ll-be-break-into-next-line
如何将比右侧更长的单词拆分并填充空白区域?
Insert ­
长单词中的软中断。有各种基于字典的 PHP 库可以为您做到这一点。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)