How do I select an element that has a certain class?

后端 未结 5 1339
清歌不尽
清歌不尽 2020-12-04 15:14

My understanding is that using element.class should allow for a specific element assigned to a class to receive different \"styling\" than the rest of the class

5条回答
  •  清歌不尽
    2020-12-04 15:46

    The CSS :first-child selector allows you to target an element that is the first child element within its parent.

    element:first-child { style_properties }
    table:first-child { style_properties }
    

提交回复
热议问题