div背景颜色怎样渐变 css实现div层背景颜色渐变代

建站知识 2021-07-03 08:43www.168986.cn长沙网站建设

复制代码
代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://.w3./TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://.w3./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(,#b8c4cb,#f6f6f8);/火狐/
background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#b8c4cb), to(#f6f6f8));/谷歌/
}
</style>
</head>
<body>
<div class="change"></div>
</body>
</html>

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by