為什么hover要作用在li上才有效,不能寫(xiě)在a上?
為什么
.topmenu?li?hover:{ ????background-image:none }
是有效的.而:
.topmenu?li?a?hover:{ ????background-image:none }
無(wú)效?
為什么
.topmenu?li?hover:{ ????background-image:none }
是有效的.而:
.topmenu?li?a?hover:{ ????background-image:none }
無(wú)效?
2016-07-16
舉報(bào)
2016-07-23
a是inline標(biāo)簽 沒(méi)有寬度和高度。li有高和寬 所以背景圖片加在li中 a是文字內(nèi)容 寬度是隨文字大小而改變的
2016-07-16
背景圖片是加在li中的