css3經常使用的屬性

word-break:break-all    自動強行換行css

word-warp:break-word    也是自動換行 (單個單詞不換行)spa

white-space:nowrap   強制不換行code

text-overflow:ellipsis; 溢出的部分隱藏 
ip

multiple   選者框裏能夠多項選擇(css)it

display:table-cell text-align:center vertival-align:middle;(居中)io


div垂直居中table

 position: absolute;
 left: 50%;
 top: 50%;width:200px;height:100px;margin-left:-100px;margin-top:-50px;

 <style>class

      .parent{margin

        width:500px;top

        height:500px;

        background-color:green;

        vertical-align:middle;

        display:table-cell;

         text-align:center;

      }

      .children{

        width:200px;

        height:200px;

        background-color:red;

        margin:0 auto;

      }

  </style>

相關文章
相關標籤/搜索