1 一行情況下用...來隱藏
````
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
````
2 文本在第二行溢出時(shí)才用...來隱藏
````
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: ?hidden;
text-overflow: ?ellipsis;
````
3 緊貼于倆端:
````
display: flex;
justify-content:?space-between;
````
4 豎向排列(使用flex時(shí))
flex-direction: column;
5 背景顏色會(huì)透到邊框下面。 background-clip可以設(shè)置背景的顯示區(qū)域(border-box|padding-box|content-box)
box-sizing: border-box? ? ? ? => 設(shè)置寬高變成content+padding+border
通常情況下css設(shè)置的寬高是content的寬高
6 外邊框直角却嗡,內(nèi)邊框圓角
````
border-radius: .8em;
box-shadow: 0 0 0 10px #655;
outline: 10px solid #655;
````
7 顏色漸變
linear-gradient(#fb3 50%, #56a 50%)? ? ? ?=> 橫向條紋