The CSS triangles are quite cool shapes used in web development, mainly to mimic the appearance of a triangle. This collection features an impressive compilation of top free HTML and CSS triangle examples that we’ve sourced from CodePen and GitHub. The best part about these unique and stylish triangle shapes is that they are suitable for decorating elements on any web design and development projects.

When you start working on any project, you need various design or code references to enhance the aesthetics of your project, No matter if you are a UI designer or developer, we have something for everyone. We hand-pick each CSS triangle code snippet in our compilation, ensuring it features vibrant colours, eye-catching animations, high customizability, and ease of implementation. There are several other ways you can use these items to beautify your project, so without further ado, let’s explore our collection of the best 42+ CSS triangle examples and impress your site audience.

1. Transparent CSS Triangle with borders


Author: creme
Source: Code / Demo
Created on: JUNE 18, 2014
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

2. Rotating Rounded Triangles Animation (SCSS)


Author: markmiscavage
Source:  Code / Demo
Created on: FEBRUARY 16, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(SCSS)

3. Centroid-centred CSS Triangle


Author: phil
Source:  Code / Demo
Created on: November 5, 2013
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Slim), CSS(Sass)

4. Triangles


Author: Katy DeCorah
Source:  Code / Demo
Created on: AUGUST 6, 2013
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Markdown), CSS(SCSS)

5. CSS Triangle / Equilateral Triangle


Author: nana
Source:  Code / Demo
Created on: OCTOBER 7, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

6. Moving on a Penrose Triangle


Author: Amit Sheen
Source:  Code / Demo
Created on: JULY  23, 2021
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

7. Pure CSS animated grid pop with grid, variables, clip-path


Author: Ana Tudor
Source:  Code / Demo
Created on: JANUARY 24, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(SCSS)

8. React Animated Page Transitions


Author: Sarah Drasner
Source: Code / Demo
Created on: MAY 1, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), JavaScript(Babel)

9.CSS Penrose Triangle


Author: startinmerc
Source:  Code / Demo
Created on: FEBRUARY 12, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

10. Pink Triangles


Author: Nikita Dubko
Source:  Code / Demo
Created on: JUNE 26, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(SCSS)

11. Penrose triangle x3


Author: Loray O’Connell
Source:  Code / Demo
Created on: OCTOBER 24, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

12. Triangle Loading Animation


Author: Tony Banik
Source:  Code / Demo
Created on: SEPTEMBER 13, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Slim), CSS(SCSS)

13.Text + double triangle


Author: Mary
Source:  Code / Demo
Created on: APRIL 5, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

14. Triangle


Author: Ranger
Source:  Code / Demo
Created on: JULY 7, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

15. North Wall


Author: magnificode
Source:  Code / Demo
Created on: JUNE 17, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

16. Triangle Grid


Author: Stephen Lee
Source:  Code / Demo
Created on: DECEMBER 4, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(SCSS)

17. Triangle


Author: parph
Source:  Code / Demo
Created on: APRIL 24, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(Sass)

18. Quick Gradient Triangle Mixin


Author: Justin
Source:  Code / Demo
Created on: FEBRUARY 24, 2015
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(SCSS)

19. CSS Triangle


Author: Nick Salloum
Source:  Code / Demo
Created on: MAY 4, 2014
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

20. Dual Triangle Preloaders


Author: Jon Kantner
Source:  Code / Demo
Created on: NOVEMBER 20, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

21. Only CSS: Triangle


Author: Yusuke Nakaya
Source:  Code / Demo
Created on: OCTOBER 4, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(SCSS)

22. Triangles


Author:  Irem Lopsum
Source:  Code / Demo
Created on: MAY 21, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(SCSS)

23. Explode cube to rhombic dodecahedron (pure CSS)


Author: Ana Tudor
Source:  Code / Demo
Created on: SEPTEMBER 19, 2013
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(SCSS)

24. Todrick Triangle – Neon Glow Effect Using CSS Drop Shadows and Clip Paths


Author: Dave Brogan
Source:  Code / Demo
Created on: NOVEMBER  28, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

25. Triangle Cutout Via Pseudo-Elements


Author: Tanner Hodges
Source:  Code / Demo
Created on: OCTOBER 29, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

26.  Penrose Triangle


Author: Mari Johannessen
Source:  Code / Demo
Created on: SEPTEMBER 15, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

27. Random Triangles Nonsense


Author: Nikolay Talanov
Source:  Code / Demo
Created on: SEPTEMBER 2, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

28. CSS 3D triangle spin


Author: Carlos
Source:  Code / Demo
Created on: OCTOBER 18, 2020
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS

29. Pyramorphix corner spin (pure CSS)


Author: Ana Tudor
Source:  Code / Demo
Created on: MARCH 2, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(SCSS)

30.Bordered image triangle


Author: Jhey
Source:  Code / Demo
Created on: MAY 3, 2020
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(Stylus)

31.Triangle Loading Animation


Author: Felix Rilling
Source:  Code / Demo
Created on: SEPTEMBER 19, 2015
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

32. Penrose Triangle


Author: Dronca Raul
Source:  Code / Demo
Created on: OCTOBER 23, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

33.Reverse clip path with blend modes


Author: Zach Saucier
Source:  Code / Demo
Created on: DECEMBER 22, 2015
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

34. Chromatic triangle


Author: Pita
Source:  Code / Demo
Created on: AUGUST 19, 2014
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(Sass)

35. Endless loading


Author: Yiting Liu
Source:  Code / Demo
Created on: MAY 25, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

36.comprise 6hedron (pure CSS)


Author:  Ana Tudor
Source:  Code / Demo
Created on: AUGUST 12, 2015
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(SCSS)

37. Triangles


Author: Matteo Belfiore
Source:  Code / Demo
Created on: MAY 26, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

38. Triangle


Author: Dronca Raul
Source:  Code / Demo
Created on: NOVEMBER 29, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

39. Now how does this happen?


Author: Ana Tudor
Source:  Code / Demo
Created on: APRIL 2, 2013
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

40. Climbing Pyramid


Author: Zach Saucier
Source:  Code / Demo
Created on: DECEMBER 29, 2013
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

41. Illuminati-Rainbow Loading


Author: Kevin Foley
Source:  Code / Demo
Created on: AUGUST 23, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(Less), JavaScript(Babel)

42.Portfolio


Author: @BrawadaCom
Source:  Code / Demo
Created on: MAY 25, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

43. Triangular openings (pure CSS)

Author: Ana Tudor
Source:  Code / Demo
Created on: SEPTEMBER 28, 2014
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(SCSS)