6. 怎样用css写线条左右渐变 <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.demo{
width:200px;
height:10px;
background:-webkit-linear-gradient(left, rgb(80,80,255,0.2) , #fff) /* Safari 5.1 - 6.0 */
background: -o-linear-gradient(left, rgb(80,80,255,0.2) , #fff); /* Opera 11.1 - 12.0 */
background: -moz-linear-gradient(left, rgb(80,80,255,0.2) , #fff); /* Firefox 3.6 - 15 */
background: linear-gradient(to left, rgb(80,80,255,0.2) , #fff); /* 标准的语法 */
}
</style>
</head>
<body>
<div class="demo" ></div>
</body>
</html>
文章插图