div背景颜色怎样渐变 css实现div层背景颜色渐变代码
发布时间:2016-12-27 来源:查字典编辑
摘要:CSS实现DIV层背景颜色渐变.change{width:100%;height:600px;FILTER:progid:DXImageTr...
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS实现DIV层背景颜色渐变</title>
<style type="text/css">
.change{
width:100%;
height:600px;
FILTER: progid:DXImageTransform.Microsoft.Gradient(gradientType=0,startColorStr=#b8c4cb,endColorStr=#f6f6f8); /*IE*/
background:-moz-linear-gradient(top,#b8c4cb,#f6f6f8);/*火狐*/
background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#b8c4cb), to(#f6f6f8));/*谷歌*/
}
</style>
</head>
<body>
<div></div>
</body>
</html>