Issue
I have a zig zag border on the bottom of my element. How can I move it to the border of the left side, instead?
.zigzag {
height: 150px;
width: 400px;
background: linear-gradient(-135deg, #e8117f 5px, transparent 0) 0 5px, linear-gradient(135deg, #e8117f 5px, #fff 0) 0 5px;
background-color: #e8117f;
background-position: left bottom;
background-repeat: repeat-x;
background-size: 10px 10px;
}
<div class="zigzag"></div>
Solution
You should be able to change the linear-gradient degrees to achieve this, and set background-repeat
to repeat-y
.
.zigzag {
height: 150px;
width: 400px;
background: linear-gradient(-137deg, #e8117f 6px, transparent 0) 0 5px, linear-gradient(320deg, #e8117f 5px, #fff 0) 0 5px;
background-color: #e8117f;
background-position: left bottom;
background-repeat: repeat-y;
background-size: 10px 10px;
}
<div class="zigzag"></div>
Answered By - Robotnicka
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.