渐变的写法

/* 简单的渐变 */
  .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);
  }
 
posted @ 2015-10-26 15:11  Debugor  阅读(266)  评论(0编辑  收藏  举报