div.classname in css file

后端 未结 12 660
臣服心动
臣服心动 2020-12-10 02:21

I have seen some developers write

HTML:

some content

CSS:

12条回答
  •  再見小時候
    2020-12-10 02:42

    That's exactly what it means. It's not good or bad practice, it depends completely on what elements you want specific classes to apply too. Sometimes you want a class to apply to all elements, other times you want the class to have different effects based on the element, such as having both span.test and div.test defined in the CSS.

提交回复
热议问题