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