tailwind で border を使って三角形が描けた
See the Pen triangle by kalz2q (@kalz2q) on CodePen.
コメント
三角形の高さは次のように計算した。 calc の中に単位を入れるのが味噌かな。
w-0 h-0 border-b-[calc(sqrt(3)*100px)] border-b-orange-300 border-r-[100px] border-r-transparent border-l-[100px] border-l-transparent