Among my collection of 10 inline divs, each one boasts a unique width and color gradient. While the 45-degree lines are uniform across all the divs, is there a way to ensure that these gradients match seamlessly?
I've shared my CSS code snippet below for reference, with only the color values varying between the different div elements.
#div1 {
background: repeating-linear-gradient(
45deg,
rgba(155,155,155,0.8),
rgba(155,155,155,0.8) 3px,
rgba(250,250,250,0.4) 3px,
rgba(250,250,250,0.4) 6px);
}
#div2 {
background: repeating-linear-gradient(
45deg,
rgba(235,102,107,0.6),
rgba(235,102,107,0.6) 3px,
rgba(250,250,250,0.4) 3px,
rgba(250,250,250,0.4) 6px);
}
div {
height:100px;
display:inline-block;
}
<div id="div1" style="width: 30px"></div><div id="div2" style="width: 40px"></div>
The current outcome showcases misaligned lines within the div elements:
My desired goal is to achieve a harmonious look among all the divs: