How to add the green bar inside the triangle just like this photo ?
I have try to add a triangle css, but I have no idea how to write the green bar into the triangle css.
css file:
.triangle {
width: 0;
height: 0;
border-style: solid;
border-width: 0 0 210px 100vw;
border-color: transparent transparent #1a202c;
}
layout code:
<div className={styles.triangle} />
2
Answers
If you are looking for CSS solution, you may be able to play around with multiple triangles here and get the desired results.
Something like this:
Don’t play with border, consider modern approach easier to adjust