Is there any reason to use selector '*.class' over '.class'?

前端 未结 4 608
Happy的楠姐
Happy的楠姐 2021-01-20 22:08

I found it in code and don\'t know what\'s the point of using *.class selector over .class selector.

4条回答
  •  悲&欢浪女
    2021-01-20 22:35

    They are roughly equivalent - the asterisk only further specifies which objects of said class to apply the selection to.

     .class // Selects all of the specific class
    *.class // Selects all of the specific class - where * can be a div, li, etc.
    

提交回复
热议问题