I am trying to create master card and i currently working on its back side but i don’t know how to create multiple linear gradient like this.
The part behind the 1234567 numbers.
In my case i want to recreate those grayish to white to grayish into linear-gradient(to right ,orange, lightblue, orange)
.
After seeing this question and i try to help me out with chat gpt but he doesn’t understand what i was trying to say.
In this question there a site. when i try to change it’s code things got little bit easier but i can’t understand to how to change those gray line into right.
this is a code wrote to explain myself better.
div{
width:100%;
height:300px;
background:#fff;
border: 3px solid #000;
display:flex;
justify-content:center;
align-items:center;
flex-direction:column;
gap: 10px;
}
span{
width:100%;
height: 10px;
background: linear-gradient(to right, orange, lightblue,orange);
display:block;
}
<div>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
2
Answers
You can use a tool like this to create your own gradient: https://cssgradient.io/
Instead of using multiple span tags you probably want to use multiple background rules, combined with child selectors, something in this direction:
Use two gradients: