If you are a web designer or developer looking for a visually stunning collection of CSS close buttons, you’re in the right spot. CSS close buttons are the imperative GUI elements mainly used in user interfaces. These close buttons provide a subtle way to dismiss pop-ups, modals, and notifications on websites or web applications.

In this comprehensive collection, we are featuring 34+ HTML and CSS class button code examples that we have sourced from GitHub, CodePen, and various other platforms.

From simple close buttons to custom-designed icons to animated close icons to eye-catching hover effects with stylish animations, we have something for everyone. Our compilation offers stylish close-button designs and cross-browser support. Each item is created to provide the blissful user experience that your site visitors want.

Let’s look at our top collection of CSS close buttons to improve user interaction and experience with your web application.

1. Hamburger to close button


Author: Gaurav Patil
Source: Code / Demo
Created on: AUGUST 24, 2020
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS, JavaScript

2. Simple pure css close button


Author: Marvin van Kalsbeek
Source: Code / Demo
Created on: OCTOBER 24, 2014
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(Less)

3. CSS only close button


Author: Zach Wolf
Source: Code / Demo
Created on: JULY 12, 2012
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

4. Simple Modal w/ CSS Close Button


Author: Charlie Hield
Source: Code / Demo
Created on: AUGUST 1, 2012
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

5. Hamburger Menu Button to Close Button


Author: Jerome Renders
Source: Code / Demo
Created on: JUNE 20, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS (Sass), JavaScript

6. Hover Animated Close Button


Author: Michael Packard
Source: Code / Demo
Created on: JULY 12, 2013
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

7. Open Close button demo


Author: Travis Hedrick
Source: Code / Demo
Created on: MARCH 4, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(Less)

8. Open / Close button with animation


Author: Murphy Randle
Source: Code / Demo
Created on: JULY 13, 2013
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Haml), CSS(SCSS), JavaScript(CoffeeScript)

9. Close button effects


Author: Jonas Badalic
Source: Code / Demo
Created on: DECEMBER 4, 2014
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), JavaScript

10. Hamburger menu Transition to Close Button


Author: Colin
Source: Code / Demo
Created on: FEBRUARY 09, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(Sass), JavaScript

11. Dots to close button


Author: Pekka Wallenius
Source: Code / Demo
Created on: OOCTOBER 09, 2015
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), JavaScript

12. A simple but interactive close button


Author: Marius Nicula
Source: Code / Demo
Created on: MARCH 30, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

13. Close button


Author: Jermbo
Source: Code / Demo
Created on: AUGUST 12, 2014
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS((Less)

14. Back To Close by Ste


Author: Stefano
Source:  Code / Demo
Created on: FEBRUARY 21, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS, JavaScript

15.  Twitter close button alternative


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

16. Pure CSS cross / close button @mixin


Author: Cyril Lamotte
Source: Code / Demo
Created on: MAY 15, 2020
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

17. Open / Close


Author: Jonathan Blair
Source: Code / Demo
Created on: APRIL 01, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS),(JavaScript)

18. Hamburger animation


Author: Aaron Iker
Source: Code / Demo
Created on: NOVEMBER 06, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), (JavaScript)

19. Close button


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

20. Close Button


Author: Saw-mon & Natalie
Source: Code / Demo
Created on: APRIL 29, 2020
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS (SCSS)

21.  Press ✕ 2s to action


Author: Jorge Epunan
Source: Code / Demo
Created on: APRIL 10, 2015
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS, JavaScript

22. Chat Bubble


Author: Mikael Ainalem
Source: Code / Demo
Created on: APRIL 09, 2020
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

23. close button


Author: Antonio Grosz
Source: Code / Demo
Created on: FEBRUARY 12, 2020
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

24. Pure CSS close icon


Author: Ndeniche
Source:  Code / Demo
Created on: OCTOBER 1, 2014
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS (SCSS)

25. Pure css close button


Author: Carson
Source: Code / Demo
Created on: MAY 19, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML(Pug), CSS(Less)

26. Close button


Author: Merrybottle
Source: Code / Demo
Created on: AUGUST 22, 2018
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS

27. animated close icon


Author: Ross s
Source: Code / Demo
Created on: OCTOBER 02, 2016
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

28. Line Menu Icon that Expands Into Actual Menu


Author: Chris Choyier
Source: Code / Demo
Created on: DECEMBER 08, 2013
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), JavaScript

29. Close button animated


Author: Pavel Volyntsev
Source: Code / Demo
Created on: OCTOBER 24, 2021
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), JavaScript

30.  Simple close button animation


Author: Keith Chisholm
Source: Code / Demo
Created on: OCTOBER 14, 2015
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS)

31. Close Animation


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

32. Add and close toggle button


Author: Cosimo Scarpa
Source: Code / Demo
Created on: APRIL 05, 2021
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), JavaScript

33. Close Button & Dialog Animation


Author: Daniel Villalba
Source: Code / Demo
Created on: JANUARY 15, 2019
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS(SCSS), JavaScript

34. close-button


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

35. Close button with css and jquery

Author: Salman Raza
Source: Code / Demo
Created on: FEBRUARY 24, 2017
Compatible browsers: Chrome, Firefox, Opera, Edge, Brave
Made with: HTML, CSS, JavaScript