谁能写出这种效果。我自己写的很丑。
要点:内阴影、外阴影、高光
<!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>
*{
margin:0;
padding:0;
box-sizing:border-box;
}
body{
background-color:#222;
}
.group-bar{
background-image: linear-gradient(90deg,#bd340b,#fff700,#308e11);
background-repeat: no-repeat;
height:3vw;
width:30vw;
margin:5vw auto;
border-radius:1.5vw;
padding:1px;
box-shadow:0 0 2px rgba(0,255,0,0.5);
}
.content{
height:100%;
width:100%;
background-color:#222;
border-radius: inherit;
}
.bar{
width:60%;
border-radius: inherit;
background-image: linear-gradient(0deg,transparent 50%,rgba(255,255,255,0.9))
,linear-gradient(90deg,#bd340b,#fff700,#308e11);
height:100%;
box-shadow:1px 0 5px rgb(227, 255, 215),
2px 0 1px rgb(236, 255, 223),
3px 0 5px rgba(129,255,41,1);
}
</style>
</head>
<body>
<div class="group-bar">
<div class="content">
<div class="bar"></div>
</div>
</div>
</body>
</html>
3 回答4.9k 阅读✓ 已解决
5 回答2k 阅读
2 回答1.9k 阅读✓ 已解决
1 回答3k 阅读✓ 已解决
3 回答2.5k 阅读
2 回答1k 阅读✓ 已解决
2 回答2.2k 阅读
题主是想问渐变背景怎么写吗?给个小例子:
如果是其他问题请描述的更确切一些