Show me HTML/CSS to make a notification badge on a button with a number in it
- User
Show me HTML/CSS to make a notification badge on a button with a number in it
Assistant
Sure! Here's an example of how you could create a notification badge on a button with a number in it using HTML, CSS, and JavaScript:
HTML:
<button class="notification-badge-button"> <span class="notification-badge">4</span> Button text </button>CSS:
.notification-badge-button { position: relative; display: inline-block; margin: 10px; } .notification-badge { position: absolute; top: 0; right: 0; background-color: #f44336; color: #fff; font-size: 12px; padding: 4px 6px; border-radius: 50%; box-shadow: 0 0 0 2px #f44336; } .notification-badge::after { content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 0; height: 0; border-top: 10px solid #f44336; border-right: 10px solid transparent; border-left: 10px solid transparent; border-bottom: 10px solid #f44336; box-shadow: 0 0 0 2px #f44336; }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.