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 | ||
|
code_language:css [2022/04/28 07:26] 86.201.9.2 |
code_language:css [2022/04/28 09:03] (Version actuelle) 86.201.9.2 |
||
|---|---|---|---|
| Ligne 4: | Ligne 4: | ||
| Fichier qui permet de paramétrer la mise en forme d'un fichier HTML. | Fichier qui permet de paramétrer la mise en forme d'un fichier HTML. | ||
| - | ==== Principale propriétés | + | ==== Propriétés |
| ^ Propriété ^ Valeurs ^ Description ^ | ^ Propriété ^ Valeurs ^ Description ^ | ||
| - | | | | | | + | | font-family |
| - | | | | | | + | | @font-face |
| - | | | | | | + | | font-size |
| - | | | | | | + | | font-weight |
| - | | | | | | + | | font-style |
| - | | | | | | + | | text-decoration |
| - | | | | | | + | | font-variant |
| - | | | | | | + | | text-transform |
| - | | | | | | + | | font | - | Super propriété de police, bombine: font-weight, |
| - | | | | | | + | | text-align |
| - | | | | | | + | | vertical-align |
| - | | | | | | + | | line-height |
| + | | text-indent | 25px | Alinéa | | ||
| + | | white-space | pre, nowrap, normal | Césure | | ||
| + | | word-wrap | break-word, normal | Césure forcée | | ||
| + | | text-shadow | 5px 5px 2px blue (horizontale, | ||
| + | ==== Propriété de couleur et de fond ==== | ||
| + | ^ Propriété ^ Valeurs ^ Description ^ | ||
| + | | color | nom, rgb(rouge, | ||
| + | | background-color | nom, rgb(rouge, | ||
| + | | background-image | url(' | ||
| + | | background-attachment | fixed, scroll | Fond fixe | | ||
| + | | background-repeat | repeat-x, repeat-y, no-repeat, repeat | Répétition du fond | | ||
| + | | background-position | (x y), top, center, bottom, left, right | Position du fond | | ||
| + | | background | - | Super propriété du fond. Combine: background-image, | ||
| + | | opacity | 0.5 | Transparence | | ||
| + | |||
| + | ==== Propriétés des boîtes ==== | ||
| + | ^ Propriété ^ Valeurs ^ Description ^ | ||
| + | | width | 150px,80% | Largeur | | ||
| + | | height | 150px,80% | Hauteur | | ||
| + | | min-widht | 150px,80% | Largeur minimale | | ||
| + | | max-widht | 150px,80% | Largeur maximale | | ||
| + | | min-height | 150px,80% | Hauteur minimale | | ||
| + | | max-height | 150px,80% | Hauteur maximale | | ||
| + | | margin-top | 23px | Marge en haut (écart extérieur) | | ||
| + | | margin-left | 23px | Marge à gauche (écart extérieur) | | ||
| + | | margin-right | 23px | Marge à droite (écart extérieur) | | ||
| + | | margin-bottom | 23px | Marge en bas (écart extérieur) | | ||
| + | | margin | 23px, 5px 23px 5px (haut, droite, bas, gauche| Super-propriété de marge. | | ||
| + | | padding-left | 23px | Marge intérieur gauche | | ||
| + | | padding-right | 23px | Marge intérieur droite | | ||
| + | | padding-bottom | 23px | Marge intérieur bas | | ||
| + | | padding-top | 23px | Marge intérieur haut | | ||
| + | | padding | 23px 5px 23px 5px (haut, droite, bas, gauche) | Super-propriété de marge intérieure. | | ||
| + | | border-width | 3px | Epaisseur de bordure | | ||
| + | | border-color | nom, rgb(rouge, | ||
| + | | border-style | solide, dotted, dashed, double, groove, ridghe, inset, outset | Type de bordure | | ||
| + | | border | 3px solid black | Super propriété de bodure. On peut également utiliser border-top, | ||
| + | | border-radius | 5px | Bordure arrondie | | ||
| + | | box-shadow | 6px 6px 0px black | Ombre de boîte | | ||
| + | |||
| + | |||
| + | ==== Propriétés de positionnement et d' | ||
| + | ^ Propriété ^ Valeurs ^ Description ^ | ||
| + | | display | block, inline, inline-block, | ||
| + | | visibility | visible, hidden | Visibilité | | ||
| + | | clip | rect (0px, 60px, 30px, 0px) rect (haut, droite, bas, gauche) | Affichage d'une partie d' | ||
| + | | overflow | auto, scroll, visible, hidden | Comportement en cas de dépassement | | ||
| + | | float | left, right, none | Flottant | | ||
| + | | clear | left, right, both, none | Arrêt d'un flottant | | ||
| + | | position | relative, absolute, static | Positionnement | | ||
| + | | top | 20px | Position par rapport au haut | | ||
| + | | bottom | 20px | Position par rapport au bas | | ||
| + | | left | 20px | Position par rapport à la gauche | | ||
| + | | right | 20px | Position par rapport à la droite | | ||
| + | | z-index | 10 | Ordre d' | ||
| + | |||
| + | ==== Propriétés des listes ==== | ||
| + | ^ Propriété ^ Valeurs ^ Description ^ | ||
| + | | list-style-type | disc, circle, square, decimal, lower-roman, | ||
| + | | list-style-position | inside, outside | Position en retrait | | ||
| + | | list-style-image | url(' | ||
| + | | list-style | - | Super-propriété de liste. Combine: list-style-type, | ||
| + | |||
| + | ==== Propriétés des tableaux ==== | ||
| + | ^ Propriété ^ Valeurs ^ Description ^ | ||
| + | | border-collapse | collapse, separate | Fusion des bordures | | ||
| + | | empty-cells | hide, show | Affichage des cellules vides | | ||
| + | | caption-side | bottom, top | Position du titre du tableau | | ||
| + | |||
| + | |||
| + | ==== Autres Propriétés ==== | ||
| + | ^ Propriété ^ Valeurs ^ Description ^ | ||
| + | | cursor | crosshair, default, help, move, pointer, progress, text, wait, e-resize, ne-resize, auto... | Curseur de souris. | | ||
| + | |||
| + | |||
| + | ==== Exemple: ==== | ||
| + | |||
| + | <code css [enable_line_numbers=" | ||
| + | /* Définition des polices personnalisées */ | ||
| + | |||
| + | @font-face | ||
| + | { | ||
| + | font-family: | ||
| + | src: url(' | ||
| + | src: url(' | ||
| + | | ||
| + | | ||
| + | | ||
| + | font-weight: | ||
| + | font-style: normal; | ||
| + | } | ||
| + | |||
| + | @font-face | ||
| + | { | ||
| + | font-family: | ||
| + | src: url(' | ||
| + | src: url(' | ||
| + | | ||
| + | | ||
| + | | ||
| + | font-weight: | ||
| + | font-style: normal; | ||
| + | } | ||
| + | |||
| + | /* Eléments principaux de la page */ | ||
| + | |||
| + | body | ||
| + | { | ||
| + | background: url(' | ||
| + | font-family: | ||
| + | color: #181818; | ||
| + | } | ||
| + | |||
| + | # | ||
| + | { | ||
| + | width: 900px; | ||
| + | margin: auto; | ||
| + | } | ||
| + | |||
| + | section h1, footer h1, nav a | ||
| + | { | ||
| + | font-family: | ||
| + | font-weight: | ||
| + | text-transform: | ||
| + | } | ||
| + | |||
| + | /* Header */ | ||
| + | |||
| + | header | ||
| + | { | ||
| + | background: url(' | ||
| + | display: flex; | ||
| + | justify-content: | ||
| + | align-items: | ||
| + | } | ||
| + | |||
| + | # | ||
| + | { | ||
| + | display: flex; | ||
| + | flex-direction: | ||
| + | } | ||
| + | |||
| + | #logo | ||
| + | { | ||
| + | display: flex; | ||
| + | flex-direction: | ||
| + | align-items: | ||
| + | } | ||
| + | |||
| + | #logo img | ||
| + | { | ||
| + | width: 59px; | ||
| + | height: 60px; | ||
| + | } | ||
| + | |||
| + | header h1 | ||
| + | { | ||
| + | font-family: | ||
| + | font-size: 2.5em; | ||
| + | font-weight: | ||
| + | margin: 0 0 0 10px; | ||
| + | } | ||
| + | |||
| + | header h2 | ||
| + | { | ||
| + | font-family: | ||
| + | font-size: 1.1em; | ||
| + | margin-top: 0px; | ||
| + | font-weight: | ||
| + | } | ||
| + | |||
| + | /* Navigation */ | ||
| + | |||
| + | nav ul | ||
| + | { | ||
| + | list-style-type: | ||
| + | display: flex; | ||
| + | } | ||
| + | |||
| + | nav li | ||
| + | { | ||
| + | margin-right: | ||
| + | } | ||
| + | |||
| + | nav a | ||
| + | { | ||
| + | font-size: 1.3em; | ||
| + | color: #181818; | ||
| + | padding-bottom: | ||
| + | text-decoration: | ||
| + | } | ||
| + | |||
| + | nav a:hover | ||
| + | { | ||
| + | color: #760001; | ||
| + | border-bottom: | ||
| + | } | ||
| + | |||
| + | /* Bannière */ | ||
| + | |||
| + | # | ||
| + | { | ||
| + | margin-top: 15px; | ||
| + | height: 200px; | ||
| + | border-radius: | ||
| + | background: url(' | ||
| + | position: relative; | ||
| + | box-shadow: 0px 4px 4px #1c1a19; | ||
| + | margin-bottom: | ||
| + | } | ||
| + | |||
| + | # | ||
| + | { | ||
| + | position: absolute; | ||
| + | bottom: 0; | ||
| + | border-radius: | ||
| + | width: 99.5%; | ||
| + | height: 33px; | ||
| + | padding-top: | ||
| + | padding-left: | ||
| + | background-color: | ||
| + | color: white; | ||
| + | font-size: 0.8em; | ||
| + | |||
| + | } | ||
| + | |||
| + | .bouton_rouge | ||
| + | { | ||
| + | height: 25px; | ||
| + | position: absolute; | ||
| + | right: 5px; | ||
| + | bottom: 5px; | ||
| + | background: url(' | ||
| + | border: 1px solid #760001; | ||
| + | border-radius: | ||
| + | font-size: 1.2em; | ||
| + | text-align: center; | ||
| + | padding: 3px 8px 0px 8px; | ||
| + | color: white; | ||
| + | text-decoration: | ||
| + | } | ||
| + | |||
| + | .bouton_rouge img | ||
| + | { | ||
| + | border: 0; | ||
| + | } | ||
| + | |||
| + | /* Corps */ | ||
| + | |||
| + | section | ||
| + | { | ||
| + | display: flex; | ||
| + | margin-bottom: | ||
| + | } | ||
| + | |||
| + | article, aside | ||
| + | { | ||
| + | text-align: justify; | ||
| + | } | ||
| + | |||
| + | article | ||
| + | { | ||
| + | margin-right: | ||
| + | flex: 3; | ||
| + | } | ||
| + | |||
| + | .ico_categorie | ||
| + | { | ||
| + | vertical-align: | ||
| + | margin-right: | ||
| + | } | ||
| + | |||
| + | article p | ||
| + | { | ||
| + | font-size: 0.8em; | ||
| + | } | ||
| + | |||
| + | aside | ||
| + | { | ||
| + | flex: 1.2; | ||
| + | position: relative; | ||
| + | background-color: | ||
| + | box-shadow: 0px 2px 5px #1c1a19; | ||
| + | border-radius: | ||
| + | padding: 10px; | ||
| + | color: white; | ||
| + | font-size: 0.9em; | ||
| + | } | ||
| + | |||
| + | # | ||
| + | { | ||
| + | position: absolute; | ||
| + | top: 100px; | ||
| + | left: -12px; | ||
| + | } | ||
| + | |||
| + | # | ||
| + | { | ||
| + | text-align: center; | ||
| + | } | ||
| + | |||
| + | # | ||
| + | { | ||
| + | border: 1px solid #181818; | ||
| + | } | ||
| + | |||
| + | aside img | ||
| + | { | ||
| + | margin-right: | ||
| + | } | ||
| + | |||
| + | /* Footer */ | ||
| + | |||
| + | footer | ||
| + | { | ||
| + | display: flex; | ||
| + | background: | ||
| + | padding-top: | ||
| + | } | ||
| + | |||
| + | footer p, footer ul | ||
| + | { | ||
| + | font-size: 0.8em; | ||
| + | } | ||
| + | |||
| + | footer h1 | ||
| + | { | ||
| + | font-size: 1.1em; | ||
| + | } | ||
| + | |||
| + | |||
| + | #tweet | ||
| + | { | ||
| + | width: 28%; | ||
| + | } | ||
| + | |||
| + | # | ||
| + | { | ||
| + | width: 35%; | ||
| + | } | ||
| + | |||
| + | #mes_amis | ||
| + | { | ||
| + | width: 31%; | ||
| + | } | ||
| + | |||
| + | #mes_photos img | ||
| + | { | ||
| + | border: 1px solid #181818; | ||
| + | margin-right: | ||
| + | } | ||
| + | |||
| + | # | ||
| + | { | ||
| + | display: flex; | ||
| + | justify-content: | ||
| + | margin-top: 0; | ||
| + | } | ||
| + | |||
| + | #mes_amis ul | ||
| + | { | ||
| + | list-style-image: | ||
| + | padding-left: | ||
| + | } | ||
| + | |||
| + | #mes_amis a | ||
| + | { | ||
| + | text-decoration: | ||
| + | color: #760001; | ||
| + | } | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||