我想实现与渐变背景颜色的多个圆圈线的横幅设计。我对此做了更多的研究。我找不到与我关心的问题相关的问题。

Bellow代码用于创建纯色背景横幅。
.blue-cross-banner{
background: #0FA2EB;
border-radius: 30px;
padding: 4em;
margin: 1em;
}我不能上传svg格式的横幅。它显示圆形线条的渐变阴影颜色。我在这里https://css-tricks.com/gradient-borders-in-css/找到了一些与我的问题相关的东西。但这对我的担忧没有帮助。
#grad2 {
background: linear-gradient(90deg, rgba(15, 162, 235, 0) 33.16%, #0FA2EB 85.35%);
border-radius: 30px;
}上面的css是需要使用背景渐变颜色的圆圈线。
发布于 2020-09-30 17:15:46
你可以像下面这样做:
.box {
height: 150px;
background: linear-gradient(90deg, red, yellow);
position: relative;
overflow: hidden;
border-radius:20px;
}
.box::before {
content: "";
position: absolute;
width: 100%;
height: 200%;
top: 0;
left: 50%;
background: repeating-radial-gradient(circle, transparent 0 20px, blue 21px 23px);
clip-path: circle(farthest-side); /* to cut extra circles*/
}<div class="box">
</div>
https://stackoverflow.com/questions/64131701
复制相似问题