# Glass Button

> A frosted glass button for colorful hero sections and image backgrounds.

- Category: [CSS Buttons](https://copy-css.com/category/buttons)
- Tags: glass, glassmorphism, blur, frosted, backdrop-filter
- Live preview: https://copy-css.com/snippets/glass-button
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<button class="btn-glass">Explore</button>
```

## CSS

```css
.btn-glass {
  padding: 14px 32px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #fff;
  font: 600 16px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.28);
}
```

## Notes

- This CSS Glass Button is 17 lines of pure CSS (0.5 KB) with no JavaScript and no dependencies. It uses transitions, box shadows and backdrop filters.
- backdrop filters: Includes the -webkit- prefix for older Safari.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
