Pour obtenir des dégradés, directement en css, voici comment procéder :
Partons du principe que vous souhaitez obtenir un dégradé allant de #333333 à #111111
background: -webkit-gradient(linear,left top,left bottom,from(#333333),to(#111111));
background: -moz-linear-gradient(top,#333333,#111111); background-image: -o-linear-gradient(#333333,#111111);
background: transparent 9;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=’#333333′,endColorstr=’#111111′);
A destination des navigateurs utilisant le moteur WebKit (chrome, safari…), c’est cette ligne qui agit :
background: -webkit-gradient(linear,left top,left bottom,from(#333333),to(#111111));
Pour les navigateurs utilisant le moteur mozilla (firefox, essentiellement) :
background: -moz-linear-gradient(top,#333333,#111111);
Pour les navigateurs de type opera :
background-image: -o-linear-gradient(#333333,#111111);
Et pour internet explorer :
background: transparent 9;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=’#333333′,endColorstr=’#111111′);
Bien entendu, on pourra se faire la remarque qu’une petite image pour faire un dégradé serait bien + compatible, et tout aussi rapide
à mettre en place. Mais ce n’est pas « In ».