Luego de investigar con expertos en este tema, programadores de varias áreas y profesores hemos dado con la respuesta al problema y la plasmamos en este post.
Ejemplo 1: selector descendiente en css
The descendant combinator — typically represented by a single space ()
character — combines two selectors such that elements matched by the second
selector are selected if they have an ancestor
(parent, parent's parent, parent's parent's parent, etc)
element matching the first selector.
example:
h1 ulborder:1px solid #f1f1f1;Explanation: This above CSS code snippet will select all the 'ul'(unordered list)
tags which are preceeded by an 'h1'(header tag).
/*the best way to understand is to practice by implemetation.
Create a html file with lots of h1 and ul elements to understand by
implementing CSS on them*/
Ejemplo 2: selector css para elemento hermano
/* Paragraphs that come immediately after any image */img + pfont-weight: bold;
Aquí puedes ver las reseñas y valoraciones de los usuarios
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)