问题
How make ZigZag line, vertical Not horizontal with css
I try, but I can't
回答1:
Try this you can adjust their size using background-size
property.
.con{
width:200px;
height:200px;
background:
linear-gradient(45deg, #ECEDDC 25%, transparent 25%) 0 -50px,
linear-gradient(135deg, #ECEDDC 25%, transparent 25%) 0 -50px,
linear-gradient(225deg, #ECEDDC 25%, transparent 25%),
linear-gradient(315deg, #ECEDDC 25%, transparent 25%);
background-size: 20px 20px;
background-color: #EC173A;
}
<div class="con"></div>
来源:https://stackoverflow.com/questions/41789598/how-make-zigzag-line-vertical-not-horizontal-with-css