html - 1px wide diagonal stripes with gap between in CSS -
i tried in css, failed miserably.
this got far:
#stripes { height:90vh; background-image: linear-gradient(-45deg, black 25%, transparent 25%, transparent 50%, black 50%, black 75%, transparent 75%, transparent); background-size:4px 4px; } <div id="stripes"></div> as can see, "black-white-ratio" same. got 1px stripe, 1px gap, 1px stripe, 1px gap,...
but trying achieve, there 5px space between stripes.
i tried changing percentages, doesn't result in try either.
i'm sure possible somehow. know how? help!
something using repeating-linear-gradient
#stripes { height: 100vh; background: repeating-linear-gradient( -45deg, transparent, transparent 5px, /* gap */ black 6px, /* overall width incluing gap */ black 6px); } * { margin: 0; padding: 0; } <div id="stripes"></div>
Comments
Post a Comment