為什么那個擋住的SPAN標簽要加上position:relative呢?
?.topmenu .lihover span /*白色小方框*/
? ? ? ? {
? ? ? ? ? ? background: white;
? ? ? ? ? ? display: inline-block;
? ? ? ? ? ? z-index: 20;
? ? ? ? ? ? width: 20px;
? ? ? ? ? ? height: 30px;
? ? ? ? ? ? float: right;
? ? ? ? ? ? position: relative;
? ? ? ? ?}?
如題
2016-01-27
z-index 屬性要求元素設置了position屬性——relative、absolute、fixed
2015-09-02
他是為了以LI為父級元素來實現(xiàn)定位,
2015-04-17
如果不用position 那么這個span標簽就會擠出去 實現(xiàn)不了遮蓋效果