This background uses a subtle accent edge to introduce hierarchy without affecting the main content area.
HTML
<div class="bg-edge">
Accent Edge
</div>CSS
.bg-edge {
width: 200px;
padding: 2rem 0;
border-radius: 11px;
background: #ffffff;
color: #111827;
font-size: 12px;
text-align: center;
position: relative;
}
.bg-edge::before {
content: "";
position: absolute;
inset: 0;
border-radius: inherit;
border-left: 4px solid #2563eb;
pointer-events: none;
}
@media (prefers-color-scheme: dark) {
.bg-edge {
background: #27272a;
color: #f4f4f5;
}
.bg-edge::before {
border-left-color: #60a5fa;
}
}Notes
- Edge-based hierarchy cue
- No gradients or shadows
- Works well for alerts and sections
Preview styles shown. Production customization recommended.
Browse More UI Components
Explore hundreds of reusable HTML & CSS UI components built for modern web projects.
Discover buttons, cards, loaders, animations, layouts, and more all with live previews and clean, copy-paste code.
