css word-wrap属性简介说明


摘要:
下文讲述css属性word-wrap的功能简介说明,如下所示;


css word-wrap属性功能说明

css word-wrap属性功能:
用于设置指定的html标签当内容超过容器的边界时,是否自动换行
此属性在css3中已经由overflow-wrap替换

css word-wrap语法:
  word-wrap:normal | break-word
 ------参数值说明-----
normal:
    允许内容顶开或溢出指定的容器边界
break-word:
   内容将在边界内换行,
   单词内部允许断行


css word-wrap属性举例

<meta charset="utf-8" />
<style>
.divTest p{width:100px;border:1px solid #000;background-color:#eee;}
.normal p{word-wrap:normal;}
.break-word p{word-wrap:break-word;}
</style>
<p>
maomao365.com <br />
 word-wrap属性示例说明
</p>
<hr />
<ul class="divTest">
	<li class="normal">
		<strong>normal:</strong>
		<p>maomao365.commaomao365.commaomao365.commaomao365.commaomao365.commaomao365.com</p>
	</li>
	<li class="break-word">
		<strong>break-word:</strong>
		<p>maomao365.commaomao365.commaomao365.commaomao365.commaomao365.commaomao365.commaomao365.com</p>
	</li>
	<li class="break-word">
		<strong>break-word:</strong>
		<p>maomao365.com猫猫教程maomao365.com猫猫教程maomao365.com猫猫教程</p>
	</li>
</ul> 
css word-wrap属性示例说明

css
word-wrap属性示例说明