TipsBlocks Web Technique Library

PRACTICAL WEB TIP

← Back to library

Card Content Reveal

Supporting copy slides up beneath a card title, revealing more information only when needed.

Live Demo

Hover over the element or use Tab to focus.

Source Code

Copy the HTML, CSS or JavaScript you need for your project.

HTML
<button class="tbx-1022" type="button"><span class="tbx-1022__label">OUR SERVICE</span><span class="tbx-1022__title">Brand design</span><span class="tbx-1022__detail">From planning to production, we support every step.</span><span class="tbx-1022__arrow" aria-hidden="true">↗</span></button>
CSS
.tbx-1022{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;width:min(232px,100%);min-height:153px;padding:22px 20px;overflow:hidden;border:1px solid #bdd5e1;border-radius:8px;background:#e4f1f5;color:#16405b;text-align:left;cursor:pointer}
.tbx-1022__label{font:700 9px/1.5 system-ui;letter-spacing:.17em;color:#488298}.tbx-1022__title{margin-top:8px;font:750 16px/1.3 system-ui;transition:transform .33s ease}.tbx-1022__detail{display:block;margin-top:7px;max-width:180px;font:500 11px/1.5 system-ui;opacity:0;transform:translateY(15px);transition:opacity .33s ease,transform .33s ease}.tbx-1022__arrow{position:absolute;top:15px;right:18px;font:22px system-ui}
.tbx-1022:is(:hover,:focus-visible) .tbx-1022__title{transform:translateY(-6px)}
.tbx-1022:is(:hover,:focus-visible) .tbx-1022__detail{opacity:1;transform:translateY(0)}
.tbx-1022:focus-visible{outline:3px solid #7b65db;outline-offset:4px}
@media(hover:none){.tbx-1022__detail{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.tbx-1022__title,.tbx-1022__detail{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 service pages and portfolio galleries.

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.