我已经阅读了 CSS 背景条纹教程,但我似乎没有找到解决这个问题的方法。如果我想要仅 1 像素宽的对角白线与约 10 像素宽的透明条纹交替出现怎么办?像这样:
我现在的代码是:
.stripes {
background: repeating-linear-gradient(
45deg,
transparent 46%, #fff 49%, #fff 51%, transparent 55%
);
width: 180px;
height: 56px;
z-index: 99;
position: absolute;
left: 0;
top: 0;
}
但这会产生模糊、粗大的白线。我对这个概念很陌生。