#block { background: #000; clip-path: polygon(0% 0%,100% 0%,100% 75%,63% 75%,50% 81%,37% 75%,0% 75%); -webkit-clip-path: polygon(0% 0%,100% 0%,100% 75%,63% 75%,50% 81%,37% 75%,0% 75%); width: 100%; height: 900px; }
<div id="block"></div>
IE does not support clip-path , so neither. You can try the method given in the code.
.triangle { width: 100%; float: left; position: relative; background: black; min-height: 900px; } .triangle::after, .triangle:after { width: 0; height: 0; border-style: solid; border-width: 60px 100px 0 100px; border-color: black transparent transparent transparent; content: ''; position: absolute; top: 100%; left: 50%; margin-left: -100px; }
<div class="triangle"></div>
In Firefox, your example doesn't work either.
But in principle there is no problem making it in SVG
<svg width="100%" height="900" viewBox="0 0 100 100" preserveAspectRatio="none"> <!-- Этот rect показывает реальный размер SVG --> <rect width="100%" height="100%" fill="lavender" /> <!-- Вот ваш прямоугольник с хвостиком --> <path d="M0,0 H100 V75 H63 L50,81 37,75 H0 Z" fill="rebeccapurple" /> </svg>
Source: https://ru.stackoverflow.com/questions/551356/
All Articles