Cheat Sheet CSS

Retrouvez ici les balises indispensables

General :

font-family

font-size : En em px ou %

font-weight

font-decoration : underline, overline, line-through, blink, none

text-align : left, center, right, justify

line-height : En px ou %

color

Background:

background-color : Nom ou rgb ou rgba ou Hexa

background-image : url("image.png")

background-attachment : fixed, scroll

background-repeat

background-position

opacity

Boîtes :

Padding et margin

width : Largeur

height : Hauteur

margin (Haut, Droite, Bas, Gauche)

padding (Haut, Droite, Bas, Gauche)

border-width : Epaisseur de bordure

border-color

border-style : solid, dotted, dashed, double, groove, ridge, inset, outset

border-radius Générateur ici

Les flottants :

Pour faire revenir le texte en dessous :

clear both

ex:

html :

<img src="flash.gif" class="imageflottante" alt="Image flottante" />

Ce texte est écrit à côté de l'image flottante.

<p class="dessous">Ce texte est écrit sous l'image flottante.</p>

css :

.imageflottante

{

float: left;

}

.dessous

{

clear: both;

}

Liens :

a:hover = Au survol

a:visited = Si lien déja visité

Listes :

list-style-type : Type de liste

list-style-position : Position

list-style-image : Puce personnalisée

Pour désactiver les puces : list-style:none;