Card Elevation
A service card lifts slightly as its shadow deepens, creating a restrained sense of elevation.
A service card lifts slightly as its shadow deepens, creating a restrained sense of elevation.
Live Demo
Hover over the element or use Tab to focus.
Source Code
Copy the HTML, CSS or JavaScript you need for your project.
<button class="tbx-1021" type="button"><span class="tbx-1021__icon" aria-hidden="true">◆</span><span class="tbx-1021__title">Web Design</span><span class="tbx-1021__small">Creative services</span><span class="tbx-1021__arrow" aria-hidden="true">↗</span></button>
.tbx-1021{display:grid;grid-template-columns:1fr auto;gap:4px;align-content:center;width:min(232px,100%);min-height:144px;padding:19px;border:1px solid #d9e3ec;border-radius:8px;background:#fff;color:#1c3551;text-align:left;box-shadow:0 3px 12px #183f6312;transform:translateY(0);transition:transform .28s ease,box-shadow .28s ease;cursor:pointer}
.tbx-1021__icon{grid-column:1/-1;color:#237fa0;font-size:17px;margin-bottom:8px}.tbx-1021__title{font:750 16px/1.2 system-ui}.tbx-1021__small{grid-column:1;font:500 12px/1.35 system-ui;color:#65758a}.tbx-1021__arrow{grid-column:2;grid-row:2/4;font-size:20px;color:#237fa0;align-self:center}
.tbx-1021:is(:hover,:focus-visible){transform:translateY(-6px);box-shadow:0 15px 28px #183f6330}
.tbx-1021:focus-visible{outline:3px solid #7b65db;outline-offset:4px}
@media(prefers-reduced-motion:reduce){.tbx-1021{transition:none}}
How to Use
Insert the HTML and add the CSS to your stylesheet. Adjust colors and sizes and avoid class conflicts.
Use Case
Useful for portfolio galleries and service pages.
Technical Notes
Keep controls usable on touch devices. Test keyboard focus and reduced-motion preferences.
Mobile: Ensure the interactive content remains accessible without hover on touch devices.
Browser: Uses modern CSS. Check behavior in the browsers you support.
Reduced Motion: Check that prefers-reduced-motion is respected.