Fork me on GitHub

Create a Triangle with pure & minimal CSS. No Images.

CSS:

.triangle-up
{
    border:solid 20px transparent;    
    border-bottom:solid 20px #000;
    width:0;
    height:0;
}

HTML:

<span class="triangle-up"></span>

Actual Result: (Try inspect element on the following triangle!)

 

I tried to put together a little image to show how its done:

0 notes

blog comments powered by Disqus