簡體   English   中英

CSS3漸變背景

[英]CSS3 gradient background

這是正確的應用漸變背景到身體從淺灰色到白色從底部到頂部?

body {
    background: -webkit-gradient(linear, bottom, top, from(#e7e7e7, to(#ffffff));
}

DEMO支持所有功能強大的瀏覽器

body {
  background-color: #ffffff;
  background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#999999));
  background-image: -webkit-linear-gradient(top, #ffffff, #999999);
  background-image:    -moz-linear-gradient(top, #ffffff, #999999);
  background-image:      -o-linear-gradient(top, #ffffff, #999999);
  background-image:         linear-gradient(to bottom, #ffffff, #999999);
}

CSS3請可能有用

對於Zoltan的解決方案,您還可以添加:

filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#999999');

支持舊的IE瀏覽器。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM