Can I use DIV class and ID together in CSS?

后端 未结 9 1483
名媛妹妹
名媛妹妹 2020-12-25 10:21

Can I use DIV Class and ID together in CSS? For example:

--
9条回答
  •  粉色の甜心
    2020-12-25 10:47

    Yes, in one single division you can use both but it's not very common. While styling you will call both so it will cause some ambiguity if you don't properly choose "x" and "y". Use # for ID and . for class. And for overall division you will either do separate styling or write: #x .y for styling purposes.

提交回复
热议问题