1

How make ZigZag line, vertical Not horizontal with css

I try, but I can't

4

1 回答 1

2

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>

于 2017-01-22T10:50:53.463 回答