Aide mémoire

CSS

Déclaration CSS : sélecteur { propriété : valeur ; }

/* Commentaire */

  1. Sélecteurs
    • Sélecteur simple : balise
    • Sélecteur multiple : sel1, sel2
    • Sélecteur universel : *
    • Sélecteur de classe : .classe, balise.classe
    • Sélecteur d'identifiant : #identifiant, balise#identifiant
    • Sélecteur contextuel : sel1 sel2
    • Pseudo-élément : balise:first-line, balise:first-letter
    • Pseudo-classes : a:link, a:visited, a:hover, a:active
  2. Valeurs
    1. Longueurs
      • %
      • em, ex
      • px
      • mm, cm, in, pt, pc
    2. Couleurs
      • aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white, yellow
      • rgb(255,255,255)
      • rgb(100%,100%,100%)
      • rgba(255,255,255,100%)
      • #FFFFFF
  3. Propriétés (Remarque : | signifie OU)
    1. Mise en forme du texte
      • font-family: serif | sans-serif | cursive | fantasy | monospace | nom_police
      • font-size: taille
      • font-style: italic | oblique | normal
      • font-variant: normal | small-caps
      • font-weight: normal | bold
      • line-height: taille
      • text-decoration: none | underline | overline | blink | line-through
      • letter-spacing: taille
      • word-spacing: taille
    2. Alignement et indentation
      • text-align: left | right | center | justify
      • vertical-align: super | sub | baseline | top | bottom
      • text-indent: taille
    3. Listes
      • list-style-type: none | disc | circle | square | decimal | upper-alpha | lower-alpha | upper-roman | lower-roman
      • list-style-image: url(chemin/monimage.png)
    4. Bordures
      • border: width style color
      • border-collapse: collapse
      • border-style: none | dotted | dashed | solid | double | groove | ridge | inset | outset
      • border-color: couleur
      • border-width: taille
    5. Couleurs et arrière-plan
      • color: couleur
      • background-color: couleur
      • background-image: url(chemin/monimage.png)
    6. Boîtes
      • width: taille | auto
      • height: taille | auto
      • margin-top, margin-right, margin-bottom, margin-left: taille | auto
      • margin: taille | auto
      • padding-top, padding-right, padding-bottom, padding-left: taille
      • padding: taille
      • overflow: visible | hidden | scroll | auto
      • display: block | inline | none
    7. Flottement et positionnement
      • float: left | right | none
      • clear: left | right | both | none
      • position: static | relative | absolute | fixed
      • top, right, bottom, left: longueur | auto
    8. Visibilité
      • visibility: visible | hidden
    9. Tables
      • caption-side: top | bottom
      • border-collapse: collapse | separate
      • empty-cells: show | hide