CSS select second level elements

后端 未结 3 831
天命终不由人
天命终不由人 2021-01-18 11:51

How to remove background on a second level li elements ?

  • Test
3条回答
  •  遥遥无期
    2021-01-18 12:17

    Your li is inside the red li. Try to just set another color, for example

    ul.navi > li > ul > li {
        background: #fff;   
    }
    

    Color: transparent will also not work here... Because when You've got color: transparent, it is transparent, and the "below" red is visible underneath it.

    Good luck, hope it helps.

    Updated: http://jsfiddle.net/zhrgyLrf/1/

提交回复
热议问题