Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Pill-Shaped Button</title> <style> /* Component: Pill-Shaped Button Description: A button with fully rounded sides for a modern, friendly look. */ :root { --pill-bg: #1de9b6; /* A fresh, modern teal */ --pill-text-color: #004d40; --pill-bg-hover: #00bfa5; --pill-focus-outline: #1de9b6; } .pill-container-1 { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; display: flex; justify-content: center; align-items: center; padding: 2rem; background-color: #f8f9fa; } .pill-btn-1 { display: inline-block; padding: 0.9rem 2rem; font-size: 1.1rem; font-weight: 700; line-height: 1.5; text-align: center; color: var(--pill-text-color); background-color: var(--pill-bg); border: none; /* Use a large value to guarantee a pill shape regardless of button height */ border-radius: 999px; cursor: pointer; text-decoration: none; box-shadow: 0 4px 10px rgba(29, 233, 182, 0.2); transition: all 0.2s ease-in-out; } .pill-btn-1:hover { background-color: var(--pill-bg-hover); transform: translateY(-2px); box-shadow: 0 6px 15px rgba(29, 233, 182, 0.3); } .pill-btn-1:active { transform: translateY(0); box-shadow: 0 4px 10px rgba(29, 233, 182, 0.2); } .pill-btn-1:focus-visible { outline: 3px solid var(--pill-focus-outline); outline-offset: 3px; } </style> </head> <body> <div class="pill-container-1"> <button type="button" class="pill-btn-1">Start Your Journey</button> </div> </body> </html>