css设置渐变色
css设置渐变色
.anamorphism{
width:100%;
height:200px;
FILTER:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#7ECCE2,endColorStr=#D1EEF5);/*IE6*/
background:-moz-linear-gradient(top,#7ECCE2,#D1EEF5);/*非IE6的其它*/
background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#7ECCE2), to(#D1EEF5));/*非IE6的其它*/
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css"> .anamorphism{ width:100%; height:200px; FILTER:progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#7ECCE2,endColorStr=#D1EEF5);/*IE6*/ background:-moz-linear-gradient(top,#7ECCE2,#D1EEF5);/*非IE6的其它*/ background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#7ECCE2), to(#D1EEF5));/*非IE6的其它*/ }</style><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>addr</title></head><body> <div class="anamorphism"> </div></body></html>