We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

Esta tradução está incompleta. Por favor, ajude a traduzir este artigo.

The > combinator separates two selectors and matches only those elements matched by the second selector that are direct children of elements matched by the first. By contrast, when two selectors are combined with the descendant selector, the combined selector expression matches those elements matched by the second selector for which there exists an ancestor element matched by the first selector, regardless of the number of "hops" up the DOM.


selector1 > selector2 { style properties }


span { background-color: white; }
div > span {
  background-color: DodgerBlue;
  <span>Span 1. In the div.
    <span>Span 2. In the span that's in the div.</span>
<span>Span 3. Not in a div at all.</span>


Especificação Status Comentário
Selectors Level 4
The definition of 'child combinator' in that specification.
Rascunho atual  
Selectors Level 3
The definition of 'child combinators' in that specification.
Recomendação Sem mudanças
CSS Level 2 (Revision 1)
The definition of 'child selectors' in that specification.
Recomendação Definição inicial

Compatibilidade de Browsers

We're converting our compatibility data into a machine-readable JSON format. This compatibility table still uses the old format, because we haven't yet converted the data it contains. Find out how you can help!

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) (Yes) 7.0 (Yes) (Yes)
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? ? ? ?

Etiquetas do documento e colaboradores

Colaboradores desta página: izaiasneto4
Última atualização por: izaiasneto4,