Another CSS Triangle Article?
There are plenty of places showcasing how to make CSS triangles, but most of the time only up, right, down, and left pointing triangles are covered.
Examples of diagonal pointing triangles can be found by digging enough, but I don’t want to dig. (As it turns out, the results are a little better when searching “CSS right angled triangle“) This post exists as a quick resource reference that covers them specifically.
Methods
There are 2 ways to achieve this. The short of it is: Remove corresponding borders or color 2 of the borders.
To create a triangle pointing southeast, set border-left to none or color the right and bottom borders.
Below is a CodePen demonstrating both techniques. For the basics of CSS triangles, see the resources below.
Check out this Pen!
Resources
Pure CSS Triangles Explained – AppendTo
CSS Triangle – CSS Tricks
CSS Triangle Generator (Handy)
