Пример:
Зигзагообразный бордюр на CSS
HTML:
1 |
<div class="zig-zag">Зигзагообразный бордюр на CSS</div> |
CSS:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
.zig-zag { margin: 32px 0; background: #337AB7; text-align: center; color: #FFF; font-size: 22px; } .zig-zag:before { background: linear-gradient(-45deg, #337AB7 16px, transparent 0), linear-gradient(45deg, #337AB7 16px, transparent 0); background-position: left top; bottom: 22px; } .zig-zag:after { background: linear-gradient(-45deg, transparent 16px, #337AB7 0), linear-gradient(45deg, transparent 16px, #337AB7 0); background-repeat: repeat-x; background-position: left bottom; top: 22px; } .zig-zag:before, .zig-zag:after { background-repeat: repeat-x; background-size: 22px; content: ""; display: block; height: 22px; left:0; width: 100%; position: relative; } |
Добавить комментарий: