css小技巧
阿新 • • 發佈:2018-12-23
- border顏色不寫預設與color一致
- css實現三角形
.triangle3{
width:0;height:0;
border:100px solid;
border-color:red transparent transparent orange;
} - css實現梯形 .triangle4{
width:600px;
border:100px solid;
border-color:transparent transparent #c00;
} - css3中drop-shadow可以給png圖示賦色 .icon{ filter: drop-shadow(20px 0 #ff8040;}
- border不支援百分百寬度
- 定位元素預設z-index:auto可以看成是z-index:0;
- z-index不為auto的定位元素會建立層疊上下文
- z-index層疊順序的比較止步於父級層疊上下文