background-image: repeating-linear-gradient(-45deg,
transparent,
transparent 20px,
black 20px,
black 40px);
Here transparent has used 2 times why? I don’t know about this reason. I have a question why not transparent 20px just one time. I want to know about the reason why use of two times .Please help me anyone.I am totally new in this topic.
transparent, (without a px value) defaults to transparent 0;. That means we get a transparent stripe from 0 to 20px. When you delete transparent, we don’t have a range for the transparent part and therefore the whole background is black, because it’s the only range defined.
You can put your example into the live example section of MDN | repeating-linear-gradient() (top of the page) to experiment yourself.
Thanks for this replay. I have stucked all day long for this line of code and in the afternoon I have done its by googling more in the web. But you have define the same .Love you guys because I always get support here.