I've created a simple outlined triangle. The problem i need to solve - is to create animation of filling the gap between triangles from bottom to top.
When i am using the fill option for polygons, the fill area overlaps the other triangle, so that there is no "hole" in the shape.
body{
background: #7085EA;
}
.triangle-container{
width: 500px;
margin: auto;
text-align:center;
}
.triangle {
stroke: #fff;
fill: transparent;
}
<div class="triangle-container">
<svg height="500" width="500">
<polygon points="250,100 100,400 400,400" class="triangle"/>
<polygon points="250,180 160,360 340,360" class="triangle"/>
</svg>
</div>
Initial codepen is here.
The area that needs to be filled is shown on screenshot here
Any help is appreciated. Thanks in advance!