Use the Gradient Tool

Use the Gradient Tool

It might be a bit tricky to create such 'gradient' effect so it's best to pull the Gradient panel out of the docking area, and expand it wide enough so you can move the stops easily to their proper position. I also always use round numbers for each stop's location, so it's easy to position the stop for the adjacent color with the exact same number. Best way is to select the stop and use the field to enter an exact value.

Copy & Paste CSS

Copy & Paste CSS

Another cool thing is that you can grab the CSS code of this gradient via the CSS Properties panel. Give the rectangle object a name and it'll be used as CSS class name. So it's there to copy & paste. That's cool :) Oh and if you like, you can also save this striped fill as a Gradient Swatch in the Swatches panel.