css文本

body{

  font-size:2rem;

  font-weight:bolder;/*normal相当于400,bold相当于700 bolder相当于strong和b*/

  font-style:italic; /*对于没有倾斜的特殊字体用oblique*/

  font-variant:small-caps;  /*有normal small-caps*/

  font-family:arial;

}

.outer {

  background-color:red;

  width:200px;

  height:200px;

}

 

 

<div class="outer">

  I am outer

  <div class="inner">

    对于没有倾斜的特殊字体用

  </div>

</div>

inner中的内容正常换行

----------------------------------------------------------------------------------------------

<div class="outer">

  I am outer

  <div class="inner">

    对于没有dsafaaaaaaaaaaaaaaaaaaaa

  </div>

</div>

inner中的内容到没有为止换行,剩下的英文单词不换行超出边界范围

------------------------------------------------------------------------------------------------

属性word-wrap:normal  |  break-word

  normal:允许内容顶开或溢出指定的容器边界

  break-word:内容将在边界内换行,如果需要,单词内部允许断行

  

  text-overflow:clip | ellipsis

  clip:超出的部分会被切掉   与overflow:hidden配合使用

  ellipsis:超出的部分会以...显示  与white-space:nowrap同时使用

posted @ 2016-07-01 22:57  Icey家的小屋  阅读(122)  评论(0编辑  收藏  举报