我这里有 5 条斜条纹……</p>
https://jsfiddle.net/70wk1hm2/
....我的左侧有问题(右侧->应该是窗口填充),它是空的,也应该有条纹,它们来自左侧(从虚无中)。没有不管浏览器窗口大小。我知道我的 margin-left 有问题,但我没有得到我想看到的结果。
并且两边的间距应该一样
HTML 代码:
<div class="stripe"></div>
<div class="stripe"></div>
<div class="stripe"></div>
<div class="stripe"></div>
<div class="stripe"></div>
CSS 代码:
.stripe {
height: 100%;
width: 2%;
background-color: black;
position: fixed;
transform: skew(-20deg);
transform-origin: left bottom;
}
.stripe:nth-child(1) {
height: 100%;
width: 2%;
margin-left: 0%;
background-color: black;
position: fixed;
}
.stripe:nth-child(2) {
height: 100%;
width: 2%;
margin-left: 4%;
background-color: black;
position: fixed;
animation-delay: 0.2s;
}
.stripe:nth-child(3) {
height: 100%;
width: 2%;
margin-left: 8%;
background-color: black;
position: fixed;
}
.stripe:nth-child(4) {
height: 100%;
width: 2%;
margin-left: 12%;
background-color: black;
position: fixed;
}
.stripe:nth-child(5) {
height: 100%;
width: 2%;
margin-left: 16%;
background-color: black;
position: fixed;
}