Matt Montenegro's Backstage

Truque de CSS de hover em imagem

por jhey ʕ•ᴥ•ʔ (@jh3yy) · · UI/UX

Truque de CSS de hover em imagem

Truque com duas imagens empilhadas e clip-path no hover. Tutorial prático.

Texto do post

one way w/ css 🪄 stack an image 2x filter 1st, unclip 2nd on :hover 🤙 a img { grid-area: 1 / 1; } img:first-of-type { filter: grayscale(1) invert(1); } img:last-of-type { clip-path: circle(0); transition: clip-path; } a:hover img:last-of-type { clip-path: circle(100%); }

Abrir o post no X ↗Abrir no acervo

Referências parecidas