Nouvelles propriétés CSS 3 (suite)

  • background multiple : Plusieurs images dans un arrière-plan.

div {
	 background:url(body-top.gif) top left no-repeat,
				url(banner_fresco.jpg) 11px 11px no-repeat,
				url(body-bottom.gif) bottom left no-repeat,
				url(body-middle.gif) left repeat-
}
  • linear-gradient : background en dégradé

Syntaxe : background : linear-gradient(x y, couleur1, ..., couleurN)

  1. x et/ou y définissent la direction du dégradé. Exemple : "to right" ou "top left",

  2. couleur : le nom, la valeur hexadécimal ou la valeur RGBa

background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);�
  • radial-gradient : background en dégradé radial

Syntaxe : background : radial-gradient(x y, couleur1, ..., couleurN)

  1. x et/ou y définissent le point d'origine

  2. couleur : le nom, la valeur hexadécimal ou la valeur RGBa

background: radial-gradient(center top, rgb(0, 255, 0) 0%, rgb(0, 0, 255) 100%);�

Last updated