私はモバイルでページ表示を作成しようとしています。浮動小数点で長い単語を区切ります
/---------\ 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
どのように単語を右側より長くして空の領域を埋めることができますか?
説明している問題を再現できませんでした。ここに例があります:http://jsfiddle.net/QYVmK/ご覧のとおり、長いテキストは必要に応じて折り返します。私はFirefox 5.0でテストしました。問題を示すjsfiddle.netに例を投稿できますか?どのブラウザを使ってテストしていますか? –
私はここFF5でそれを再現することができます:http://jsfiddle.net/BMYqx/ – Floern
Floernのjsfiddleもクロムで壊れます –