CSS3 linear and radial gradient


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  1. .gradient.linear {
  2. /* fallback color */
  3. background:#555555;
  4. /* Webkit legacy syntax */
  5. background:-webkit-gradient(linear,left top,left bottom,from(#FFFFFF),to(#000000));
  6. /* >= Gecko 1.9.2 */
  7. background:-moz-linear-gradient(#FFFFFF,#000000);
  8. /* Webkit new syntax */
  9. background:-webkit-linear-gradient(#FFFFFF,#000000);
  10. /* < IE8 */
  11. filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFF, endColorstr=#000000);
  12. /* >= IE8 */
  13. -ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFF, endColorstr=#000000)";
  14. }
  15.  
  16. .gradient.radial {
  17. /* fallback color */
  18. background:#555555;
  19. /* Webkit legacy syntax */
  20. background:-webkit-gradient(radial,center center,0,center center,100,from(#FFFFFF),to(#000000));
  21. /* >= Gecko 1.9.2 */
  22. background:-moz-radial-gradient(#FFFFFF,#000000);
  23. /* Webkit new syntax */
  24. background:-webkit-radial-gradient(#FFFFFF,#000000);
  25. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.