Crossbrowser gradient background


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

This is to make a vertical gray gradient with lighter on top and darker gray on bottom.
Microsoft filter syntax is: #AARRGGBB where RGB is known, and AA represents hexadecimal Alpha value (opacity).


Copy this code and paste it in your HTML
  1. body{
  2. background: -moz-linear-gradient(100% 100% 90deg, #e3e3e3, #f1f1f1);
  3. background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f1f1f1), to(#e3e3e3));
  4. filter: progid:DXImageTransform.Microsoft.gradient(enabled='true', startColorstr=#FFF1F1F1, endColorstr=#FFE3E3E3);
  5. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.