渐变的写法

/* 简单的渐变 */
  .fn-linear {
  background: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#f1f1f1));
  background: -moz-linear-gradient(top, #fcfcfc, #f1f1f1);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcfcfc', endColorstr='#f1f1f1');
  background:-o-linear-gradient(top, #fcfcfc, #f1f1f1);
  background:-ms-linear-gradient(top, #fcfcfc, #f1f1f1);
  background: linear-gradient(to bottom, #fcfcfc, #f1f1f1);
  }
   
  /* 浅色的渐变 */
  .fn-linear-light {
  background: -webkit-gradient(linear, left top, left bottom, from(#fcfcfc), to(#f9f9f9));
  background: -moz-linear-gradient(top, #fcfcfc, #f9f9f9);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fcfcfc', endColorstr='#f9f9f9');
  background:-o-linear-gradient(top, #fcfcfc, #f9f9f9);
  background:-ms-linear-gradient(top, #fcfcfc, #f9f9f9);
  background: linear-gradient(to bottom, #fcfcfc, #f9f9f9);
  }
 
原文地址:https://www.cnblogs.com/wz0107/p/4911288.html