停止换行字 [英] Stop word-wrap dividing words

查看:117
本文介绍了停止换行字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

body { word-wrap: break-word;}

我一直在使用该代码(上面),以适应正文到它的容器中的文本。然而我不喜欢它,是它打破了单词。

I've been using that code (above) to fit the text in the body into it's container. However what I don't like about it, is that it breaks up words.

有没有另一种方法,它不会在单词之前或之后分割单词和换行符?

Is there another way where it will not break up words and only line break after or before a word?

EDIT:这是用于 UIWebView

This is for use within a UIWebView.

推荐答案

use white-space:wrap;

更新 -
在Firefox中呈现的数据

update - rendered data in Firefox

这篇关于停止换行字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆