I have a shape with an edge like this in Photoshop:
Is it possible to make the repeated triangles as a border with CSS?
You can use gradients to create a zig-zag patterned background, use the ::after pseud-element to apply it like a border.
::after
.header{ color: white; background-color: #2B3A48; text-align: center; } .header::after { content: " "; display: block; position: relative; top: 0px; left: 0px; width: 100%; height: 36px; background: linear-gradient(#2B3A48 0%, transparent 0%), linear-gradient(135deg, #272220 33.33%, transparent 33.33%) 0 0%, #272220 linear-gradient(45deg, #272220 33.33%, #2B3A48 33.33%) 0 0%; background-repeat: repeat-x; background-size: 0px 100%, 9px 27px, 9px 27px; }
<div class="header"><h1>This is a header</h1></div>
1.4m articles
1.4m replys
5 comments
57.0k users