
Hamburger menu icon
12/7/21About 1 minCSSArticle(s)blogcss-tip.comcss
Hamburger menu icon 관련
CSS > Article(s)
Article(s)
Create a CSS-only hamburger menu icon with 2 gradients. Adjust one value to control the size.

.menu {
width:80px; /* update this to control the size */
aspect-ratio:1;
background:
radial-gradient(closest-side at 50% 25%,#000 96%,#0000) top/20% 40%,
linear-gradient(#000 50%,#0000 0) top/80% 40% repeat-y;
}
See Hamburger menu by t_afif on CodePen.
More detail
More CSS Tips
- One big image + thumbnails A CSS grid with a big image and thumbnails. December 15, 2021
- Full screen height container Make your container fill all the screen height. December 15, 2021
- Circular dashed border Use mask and gradient to create a fancy dashed border. November 25, 2021
- CSS-only scrolling shadow Create a scrolling shadow effect using only CSS gradients. November 24, 2021

Hamburger menu icon
Use CSS gradients to create a menu icon