CSS Button Generator

Free online CSS button style generator. Real-time preview, one-click CSS/HTML/SCSS code generation. Supports text, size, border radius, gradient, shadow, border, Hover/Active states, animation presets and more.

📝 Text / Font Settings
16
0
1.5
🎨 Background Settings
100
📐 Size / Border Radius
Padding (px)
12
24
12
24
8
✨ Shadow Effect
Text Shadow
0
0
0
Box Shadow
0
4
6
0
🧱 Border Settings
0
Gradient Border (border-image)
🎬 Animation / Hover / Active
Hover Animation Presets
Hover State
1.05
-2
Active State (Pressed)
2
Transition Animation
0.3
⚙️ Advanced Options
Inline Icon (Lucide)
16
Current Preset: Flat Blue

What is the CSS Button Generator?

CSS Button Generator is a comprehensive free online tool that helps you quickly generate beautiful CSS button styles. No coding required — adjust parameters via the visual panel for real-time preview, and generate ready-to-use CSS/HTML/SCSS code with one click.

Core Features

  • Text/Font Control — Customize button text, font, size, color, weight, italic, letter spacing, and line height
  • Background — Background color + opacity control, supports linear/radial/conic gradients
  • Size/Radius — Independent width, height, and 4-side padding controls, supports unified or separate corner radius
  • Shadow Effects — Text shadow (X/Y/Blur/Color) + Box shadow (X/Y/Blur/Spread/Color/Inset)
  • Border Control — Unified or 4-side independent borders (width/style/color), supports border-image gradient borders
  • Hover/Active States — Hover background color, scale, Y-offset, gradient/shadow overlay; press offset + automatic color darkening
  • Animation Presets — 8 CSS animations: Neon Glow, Slide Reveal, Progress Fill, Border Snake, Pulse Scale, Ripple Effect, 3D Rotate, Fill Rise
  • Transition Animation — Adjustable duration and timing function

Preset Schemes

Includes 10 one-click color schemes: Flat Blue, 3D Raised Green, Gradient Purple, Neon Green, Glassmorphism, Outline Dark, Pill Rounded, Material Red, Retro Orange, Minimal Ghost. Quickly switch between different styles.

Code Output

  • CSS — Complete button style code (.btn-custom + :hover + :active), optional vendor prefixes
  • HTML — Sample code for both <button> and <a> tags
  • SCSS — SCSS mixin version for easy reuse in projects

Inline Icon Support

Includes 10 Lucide inline SVG icons (Download, Right Arrow, Search, Heart, Star, Settings, User, Mail, Send, Upload) with selectable position (left/right) and size.

Privacy Note: All CSS button generation is done entirely in your browser. Code is never uploaded to any server. You can use it with confidence.

🙏 帮我们做得更好

我们是刚上线的编程教程站,几个人的小团队,精力有限。页面虽经检查,难免还有疏漏——链接失效、排版错乱、内容有误、语言生硬……

如果您发现了,麻烦告诉我们,我们会在收到反馈后第一时间进行修复,再次感谢您的光临 🙏