一个top参数表示从顶开始
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="utf-8" />
<title>linear-gradient</title>
<style>
div {
width: 200px;
height: 100px;
margin-top: 10px;
border: 1px solid #ddd;
}
.test {
background: -webkit-linear-gradient(top, red, blue);
}
</style>
</head>
<body>
<div class="test"></div>
</body>
</html>