A service card can feel lively without making its text jump around. Animate one decorative icon and leave the rest of the card steady. On Carrier Lynx, custom icons and hover details gave an intentionally simple website extra character. This lesson uses a separate, simplified symbol to teach that idea.
Change the CSS below. The preview updates as you type. Your edits stay in this browser tab.
Hover over the service card or Tab to it. Change --turn, --scale, or --duration.
HTML for this example
<a class="service-card" href="#demo-detail"><span class="service-icon" aria-hidden="true">✳</span><span><strong>Small details.<br>Lasting character.</strong><span class="service-copy">A fictional service card with one moving accent.</span></span><span aria-hidden="true">↗</span></a><p id="demo-detail" class="example-note">Demo destination. Point your own card to its service page.</p>
Transform the child, not the card
The transition lives on .service-icon. Rotating and scaling that child changes its appearance without changing the grid tracks around it. Keep enough padding around the icon so it cannot collide with the title. In the editor, try --turn: -25deg, --scale: 1.05, and a slower duration.
Keep the meaning in the text
The decorative symbol has aria-hidden="true"; the visible service name supplies the link’s meaning. Keyboard focus triggers the same effect and adds an outline. Hover motion is limited to an input that supports hover, and reduced-motion preferences turn off the transition. Nothing essential depends on seeing the animation.
Use restraint when repeating the pattern
Try the card at a narrow width and with a two-line service name. A small rotation often works better than a full spin. Use one ordinary link for the card, and change the demo anchor to the service’s actual URL before using it.
See the design context in our Carrier Lynx case study. This teaching example is not the client’s production icon code.
Reference: MDN on transform.
Have a client website that needs this kind of attention? See our WordPress development for agencies and case studies.


Leave a Reply