Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/82.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 破除长句的方法_Html_Css_Iphone_Word Wrap - Fatal编程技术网

Html 破除长句的方法

Html 破除长句的方法,html,css,iphone,word-wrap,Html,Css,Iphone,Word Wrap,我正在为我的网站开发一个iPhone主题,你能不能把这样一个长句打断: A long sentence would go past the iPhone screen and I need this to break 为此: A long sentence would go past the iPhone screen and I need this to break 表现如下: A long sentence would go past the iPhone screen and I ne

我正在为我的网站开发一个iPhone主题,你能不能把这样一个长句打断:

A long sentence would go past the iPhone screen and I need this to break
为此:

A long sentence would go past the iPhone
screen and I need this to break
表现如下:

A long sentence would go past the iPhone screen and I need this to break

如果文本中有空格,则为wrap元素添加宽度将自动打断文本。但是如果您的文本没有空格(例如链接),则可以使用
断开word

.your-selector {
  word-wrap: break-word;
}

我认为问题在于“视口”比设备屏幕宽。请参阅了解一些背景信息和可能的解决方案。

根据:

wordwrap
似乎不再有效,请改用
空白