Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
web:html:formulaires:pseudoclass [2023/04/07 11:58] – [Validité des données] jcheron | web:html:formulaires:pseudoclass [2023/04/07 15:46] (Version actuelle) – [Validité des données] jcheron | ||
---|---|---|---|
Ligne 9: | Ligne 9: | ||
^:focus | Cible un élément ayant le focus | | ^:focus | Cible un élément ayant le focus | | ||
^:active | Cible un élément activé au clavier ou à la souris | | ^:active | Cible un élément activé au clavier ou à la souris | | ||
+ | ^:required | Cible un élément requis (ayant l' | ||
+ | ^:optional| Cible un élément non requis (opposé de **: | ||
+ | ^:valid | Cible un élément valide (ou n' | ||
+ | ^:invalid | Cible un élément non requis (opposé de **:valid**) | | ||
==== Champs requis ==== | ==== Champs requis ==== | ||
Ligne 45: | Ligne 48: | ||
- | Il est possible d' | + | Il est possible d' |
<sxh html> | <sxh html> | ||
Ligne 101: | Ligne 104: | ||
==== Validité des données ==== | ==== Validité des données ==== | ||
- | L' | + | L' |
**:valid** et **: | **:valid** et **: | ||
Ligne 156: | Ligne 159: | ||
right: -20px; | right: -20px; | ||
top: 0px; | top: 0px; | ||
+ | margin-right: | ||
} | } | ||
# | # | ||
- | border: 2px solid red; | + | border: 2px solid #db4764; |
} | } | ||
# | # | ||
content: ' | content: ' | ||
- | color: | + | color: |
} | } | ||
Ligne 171: | Ligne 175: | ||
color: green; | color: green; | ||
} | } | ||
+ | # | ||
+ | font-size: 1rem; | ||
+ | position: absolute; | ||
+ | content: " | ||
+ | color: white; | ||
+ | background-color: | ||
+ | padding: 5px 10px; | ||
+ | top: -36px; | ||
+ | left: -70px; | ||
+ | border-radius: | ||
+ | } | ||
+ | |||
</ | </ | ||
<div class=" | <div class=" | ||
<div id=" | <div id=" | ||
- | <label for="prenom">Prénom | + | <label for="nom">Nom *: </ |
- | <input id="prenom" name="prenom" type=" | + | <input id="nom" name="nom" type=" |
< | < | ||
</ | </ | ||
</ | </ | ||
</ | </ | ||
+ | |||
+ | < | ||
+ |