How do I make a background with diagonal stripes?

How do I make a background with diagonal stripes?

enter a description of the image here

Author: Sevastopol', 2020-03-09

2 answers

div.striped {
      background: repeating-linear-gradient(
        45deg,
        #333333,
        #333333 25px,
        #000000 25px,
        #000000 50px
      );
    }
<div class="striped" style="height: 200px">
</div>
 1
Author: Roman86, 2020-03-09 20:33:18

Very simply

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(45deg, #000000 25%, #333333 25%, #333333 50%, #000000 50%, #000000 75%, #333333 75%, #333333);
  background-size: 100px 100px;
}

And more

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(45deg, #555 25%, #222 25%, #222 50%, #555 50%, #555 75%, #222 75%, #000);
  background-size: 200px 200px;
}

3d

body {
  margin: 0;
  padding: 0;
  background: linear-gradient(45deg, #555 25%, #555 25%, #222 50%, #555 50%, #555 75%, #222 75%, #000);
  background-size: 200px 200px;
}

Cool?

 3
Author: Sevastopol', 2020-03-09 20:33:13