How to select multiple elements that are children of given element?

后端 未结 3 1007
北恋
北恋 2020-12-24 05:10

I have

and I need to select all pre and div elements that are children of #mydiv.

I coul

3条回答
  •  旧时难觅i
    2020-12-24 05:42

    You'll have to reference #mydiv twice...

    #mydiv > pre, #mydiv > div
    

    I removed the extraneous div element selector as the ID is specific enough.

提交回复
热议问题