🎯 Seletores CSS
Em poucas palavras
Definição técnica ou simplificada do conceito.
📝 Notas e Desenvolvimento
Cascading Style Sheets presents several [CSS selectors] (https://www.w3schools.com/cssref/css\_selectors.asp). The main ones are
- ** Element **: applies style to all elements
- ** ID **: Uses a unique identification for the element through the attribute
id =" unique identification ". - ** Class **: Uses an identification that can be used in various elements to apply a particular style.
- ** ID **: Uses a unique identification for the element through the attribute
The application of CSS styles follows an order of priority being it:
-
Style by classes
-
Style by element type
It is also possible to combine various ways to select the elements that should be stylized as shown in the table below.
| Type | Description |
|---|---|
| A, B | Multiple Selection |
| A B | Descendant Selection |
| A> B | Son Selection |
| A + B | Settlement of the adjacent brother |
| [A = B] | Attribute Selection |
| A: B | Pseudoclass Selection |
| A :: B | Pseudo -Elementary Selection |
Styles can be applied to pseudoclasses as for when we want to apply the styles in a given situation, for example, by floating an element with the mouse. | |
🔗 Conexões e Contexto
- Atlas: MdC - Programação
- Notas Relacionadas: