How make zigzag line, vertical Not horizontal with css

佐手、 提交于 2019-12-11 07:56:25

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!