How do you select any child element?

2019-05-26 22:06发布

问题:

div > a{

}

applies properties to <a> child. But how can I select any type of element, not just <a> ?

回答1:

This should select all direct child objects of all DIVs.

div > * {
}


回答2:

Use the below.

div > * {
  Your css attributes should be here
}

Hope this helps.



回答3:

Use the following...

div > * {}