标签:插入图片 com image ble 线性 dev ati roc die
语法1:
background: linear-gradient(起始方向, 颜色1, 颜色2, ...);
background: -webkit-linear-gradient(left, red , blue);
background: -webkit-linear-gradient(left top, red , blue);
背景渐变必须添加浏览器私有前缀
起始方向可以是: 方位名词 或者 度数 , 如果省略默认就是 top
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
div {
width: 600px;
height: 200px;
/* 背景渐变必须添加浏览器私有前缀 */
/* background: -webkit-linear-gradient(left, red, blue); */
/* background: -webkit-linear-gradient(red, blue); */
background: -webkit-linear-gradient(top left, orange, yellowgreen);
}
</style>
</head>
<body>
<div></div>
</body>
</html>
0078 背景线性渐变:background: linear-gradient(起始方向, 颜色1, 颜色2, ...)
标签:插入图片 com image ble 线性 dev ati roc die
原文地址:https://www.cnblogs.com/jianjie/p/12127288.html