<html>
<body>
<p>使用css的repeating-linear-gradient实现条纹背景</p>
<div class="demo">一般会在条纹背景上加个错位的图片</div>
</body>
<style>
.demo{
height: 300px;
background: repeating-linear-gradient(135deg,
transparent 0, #000 1px, transparent 2px, transparent 5px);
color: red
}
</style>
</html>