<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>爱周末 &#187; word-wrap</title>
	<atom:link href="http://zhoumo123.cn/tag/word-wrap/feed" rel="self" type="application/rss+xml" />
	<link>http://zhoumo123.cn</link>
	<description>知识分享，共同进步。zhoumo123.cn</description>
	<lastBuildDate>Thu, 07 Nov 2019 05:53:49 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.0.1</generator>
	<item>
		<title>css 控制文本强制换行word-wrap强制换行</title>
		<link>http://zhoumo123.cn/web/css/3338.html</link>
		<comments>http://zhoumo123.cn/web/css/3338.html#comments</comments>
		<pubDate>Mon, 28 Sep 2015 11:45:19 +0000</pubDate>
		<dc:creator><![CDATA[zhangc]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[word-wrap]]></category>

		<guid isPermaLink="false">http://zhoumo123.cn/?p=3338</guid>
		<description><![CDATA[css word-wrap强制文本换行方法， 使用word-wrap属性。在默认情况下，如果文本的内容超过某个div块的宽度的话，就会发生自动换行，因为div块的white-space属性的默认值是normal。但是也有两种情况： 1、如果div块里是一串的文字内容，那么到了div块的width限制时，会自动换行。 2、如果div块里一串没有空格的字母或者数字的时候是那就不换行了，而是直接溢出div块。这时就要考虑css文字强制换行了。 那CSS样式怎么控制文字的强制换行？ 这时候我们需要用到word-wrap属性，还有一个属性word-break也能够解决换行问题，但是它的浏览器兼容性不好， ...  <a href="http://zhoumo123.cn/web/css/3338.html">  阅读全文 </a>]]></description>
				<content:encoded><![CDATA[<p>css word-wrap强制文本换行方法， 使用word-wrap属性。在默认情况下，如果文本的内容超过某个div块的宽度的话，就会发生自动换行，因为div块的white-space属性的默认值是normal。但是也有两种情况：<br />
1、如果div块里是一串的文字内容，那么到了div块的width限制时，会自动换行。<br />
2、如果div块里一串没有空格的字母或者数字的时候是那就不换行了，而是直接溢出div块。这时就要考虑css文字强制换行了。<br />
那CSS样式怎么控制文字的强制换行？<br />
这时候我们需要用到word-wrap属性，还有一个属性word-break也能够解决换行问题，但是它的浏览器兼容性不好，并且还有可能导致其他问题，所以这里不建议使用。<br />
word-wrap的break-word属性值可以导致换行，一般说来如果一个单词比较长的话，行末的空间不足以容纳这个单词就会产生换行，而不是将一个单词截断，word-break的break-all属性值可以截断一个单词。例如:<br />
&lt;style type=&#8221;text/css&#8221;&gt;<br />
.first<br />
{<br />
width:120px;<br />
height:60px;<br />
border:1px solid blue;<br />
word-wrap:break-word<br />
}<br />
.second<br />
{<br />
width:120px;<br />
height:60px;<br />
border:1px solid red;<br />
word-break:break-all;<br />
}<br />
&lt;/style&gt;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://zhoumo123.cn/web/css/3338.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
