单纯的背景色渐变:

background: -webkit-gradient(linear, 0 0, 0 100%, color-stop(0, #fff), color-stop(1, #ddd));
background: linear-gradient(to bottom, #fff 0px, #ddd 100%) repeat scroll 0% 0%;

可以同时支持谷歌、火狐浏览器,兼容性比较强。

 

背景图的位置:

background:url("images/taocan-bg.png") no-repeat -315px 0px;

background:url("images/taocan-bg.png") no-repeat -315px bottom;

这两个是有区别的,bottom有的时候不显示,而0px会显示。

相关文章:

  • 2022-12-23
  • 2021-06-23
  • 2021-07-04
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-10-27
猜你喜欢
  • 2021-11-09
  • 2022-01-15
  • 2022-01-02
  • 2021-05-17
  • 2022-12-23
  • 2021-12-23
相关资源
相似解决方案