css3背景色渐变

<style>
.test {
width: 200px;
height: 200px;
background: -moz-linear-gradient(top, #8fa1ff, #3757fa); /* Firefox */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0, #8fa1ff), color-stop(1, #3757fa)); /* Saf4+, Chrome */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#8fa1ff', endColorstr='#3757fa', GradientType='0'); /* IE*/
}
</style>

 

<div class="test"></div>

你可能感兴趣的:(css3背景色渐变)