Give it a repating linear gradient background, but to avoid the gradients and to only get two separate colors, do it as follows (play around with the settings to get the stripe width and colors you like):
You could use linear-gradient in the background and make small boxes which makes it easy to alter the width of the stripes (10px times 10px in my example) which then form the background like this:
(edit: I added a second example in the codepen)
Similar to an already given answer, but with an addition to avoid gradients:
http://codepen.io/anon/pen/EyNwOq
Give it a repating linear gradient background, but to avoid the gradients and to only get two separate colors, do it as follows (play around with the settings to get the stripe width and colors you like):
You could use
linear-gradient
in the background and make small boxes which makes it easy to alter the width of the stripes (10px times 10px in my example) which then form the background like this:You should be able to change the
background-size
and thelinear-gradient
colours very easily to fit what you want to achieve.it can be done with background:repeating-linear-gradient
div { height:100px;width:100px;background: repeating-linear-gradient( -45deg,#000, #333 1px,#000 1px);}