TipsBlocks Web Technique Library

PRACTICAL WEB TIP

← Back to library

Offset Hatch CTA

An offset, hatched shadow emerges behind a button and sharpens its silhouette.

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
<a class="tbx-1121" href="#enquiry"><span class="tbx-1121__face"><span><small>START A PROJECT</small><strong>Discuss a project</strong></span><b aria-hidden="true">↗</b></span></a>
CSS
.tbx-1121{display:block;position:relative;width:min(272px,100%);color:#fff;text-decoration:none;font-family:system-ui,sans-serif;isolation:isolate;margin:0 10px 10px 0}.tbx-1121:before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(135deg,#c88f6d 0 3px,transparent 3px 8px);border:1px solid #c88f6d;transform:translate(0,0);transition:transform .4s cubic-bezier(.2,.8,.2,1);z-index:-1}.tbx-1121__face{height:85px;padding:17px 17px;display:flex;align-items:center;justify-content:space-between;background:#284b55;border:1px solid #284b55;transition:transform .4s cubic-bezier(.2,.8,.2,1)}.tbx-1121__face>span{display:flex;flex-direction:column;gap:7px}.tbx-1121 small{font-size:9px;font-weight:800;letter-spacing:.15em;color:#bbd4d2}.tbx-1121 strong{font-size:17px;letter-spacing:.02em}.tbx-1121 b{font-size:27px;font-weight:400;transition:transform .4s}.tbx-1121:is(:hover,:focus-visible):before{transform:translate(10px,10px)}.tbx-1121:is(:hover,:focus-visible) .tbx-1121__face{transform:translate(-3px,-3px)}.tbx-1121:is(:hover,:focus-visible) b{transform:translate(3px,-3px)}.tbx-1121:focus-visible{outline:3px solid #c88f6d;outline-offset:5px}@media(prefers-reduced-motion:reduce){.tbx-1121,.tbx-1121 *,.tbx-1121:before{transition:none!important}}

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 calls to action and company websites.

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.