问题描述
好的,我正在尝试从图像创建一个自行生成的背景。正如您在代码中看到的,我已经创建了图像的线性渐变颜色。但我们的想法是从这些图像的边缘获取这些颜色并将它们放在背景中。
.header-card {
position: relative;
// Todo: Realizar un mixin sass con el fondo de las imagenes de CARDS
&.bg {
&-0,&-4,&-8,&-12,&-16,&-20 {
background: linear-gradient(241deg,rgb(67,5,70) 0%,rgb(31,39,145) 100%);
}
&-1,&-5,&-9,&-13,&-17 {
background: linear-gradient(241deg,rgb(43,88,172) 0%,rgb(53,53,53) 100%);
}
&-2,&-6,&-10,&-14,&-18 {
background: linear-gradient(241deg,rgba(81,85,87,1) 0%,rgb(46,46,97) 100%);
}
&-3,&-7,&-11,&-15,&-19 {
background: linear-gradient(241deg,rgba(0,6,rgb(100,112,221) 100%);
}
}
.photo {
height: 150px;
width: 100%;
img {
display: flex;
height: 100%;
margin: 0 auto;
object-fit: contain;
width: 100%;
}
&:hover {
cursor: pointer;
}
&-resource {
img {
object-fit: cover;
width: 100%;
}
}
}
我尝试做的图片示例:
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)