2012-06-26 43 views

回答

1
.b{ 
    background: #ffffff; /* Old browsers */ 
    background: -moz-linear-gradient(top, #ffffff 0%, #ebebeb 100%); /* FF3.6+ */ 
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffffff), color-stop(100%,#ebebeb)); /* Chrome,Safari4+ */ 
    background: -webkit-linear-gradient(top, #ffffff 0%,#ebebeb 100%); /* Chrome10+,Safari5.1+ */ 
    background: -o-linear-gradient(top, #ffffff 0%,#ebebeb 100%); /* Opera 11.10+ */ 
    background: -ms-linear-gradient(top, #ffffff 0%,#ebebeb 100%); /* IE10+ */ 
    background: linear-gradient(top, #ffffff 0%,#ebebeb 100%); /* W3C */ 
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ebebeb',GradientType=0); /* IE6-9 */ 
    height:25px; 
    border:1px #DDDDDD solid; 
}​ 

我用終極CSS Gradient Generator爲所有瀏覽器生成漸變。

DEMO

+0

我的問題是,以獲得相同程度在圖片框的顏色,我已經有了這個代碼,但我需要的色彩度,畫面中的盒子是更輕 –

+0

在這種情況下,它從'#FFFFFF'到'#F5F5F5' – sachleen