How can I add shadow to a button in HTML?
- User
How can I add shadow to a button in HTML?
- Assistant
You can add a button in HTML via "filter: drop-shadow". Example shown below:
body { background: #76d7c4; }
button { text-transform: uppercase; padding: 10px 20px; color: white; cursor: pointer; background: transparent; /* no background! */ border: 1px solid white; border-radius: 100px;
position: relative; /* new */ }
button:after { content: ""; position: absolute; /* Making pseudoelement the same size as container / left: 0; right: 0; top: 0; bottom: 0; / Inheriting border properties / border-radius: inherit; border: inherit; / Applying filter with shadow */ filter: drop-shadow(5px 5px 1px rgba(0, 0, 0, 0.25)); }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Identical first prompt
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)Compare side by side →
- Human-written demonstration (OpenAssistant volunteers)