Пропустить навигацию
image crossfade with CSS :has() 💅
0:00 / 0:25

image crossfade with CSS :has() 💅

jhey ʕ•ᴥ•ʔ

@jh3yy144 тыс. подписчиков

Открыть в X
1 065 отметок «Нравится»СкачатьОригинальный пост

108 894 просмотра

image crossfade with CSS :has() 💅 img { transition: opacity 0.24s; } ul:has(li:nth-of-type(2):hover) img:nth-of-type(2) { mix-blend-mode: plus-lighter; opacity: 1; z-index: 2; } few tricks to this demo 🤙

10 комментариев

Комментарии из оригинального поста в X (Twitter)

  • Фото профиля jhey ▲🐻🎈

    @jh3yy

    the impact of "plus-lighter" 👇 it might seem minimal but your eyes pick up on it without even noticing when doing a crossfade you're trying to avoid the backdrop showing through so apply "mix-blend-mode" to the thing being faded in

    38 отметок «Нравится»

  • Фото профиля jhey ▲🐻🎈

    @jh3yy

    this one was a neat challenge request 🤙 leaning into CSS foundations and then taking control with a little JavaScript looks like a lot of code because it caters to configuring different behaviors, etc. 😁 here's the @CodePen 👇

    54 отметки «Нравится»

  • Фото профиля Jay

    @jayair

    my bookmarks are basically just all your posts

    11 отметок «Нравится»

  • Фото профиля jhey ▲🐻🎈

    @jh3yy

    appreciate it 😅 this year's "holidays project" is to properly build out the site to accompany the newsletter 🙏 then you can jus' bookmark the site hopefully ha

    5 отметок «Нравится»

  • Фото профиля Luke B.

    @LukeB_CREATOR

    This just gave me such a cool new use case for a project I'm working on right now. Suckers can get shitfaced on #BlackoutWednesday. I'll spend the night playing with code like the cool kids.

    1 отметка «Нравится»

  • Фото профиля jhey ▲🐻🎈

    @jh3yy

    what's "Blackout Wednesday"? 👀 i'm literally sittin' here writing today's newsletter issue

  • Фото профиля manel kape

    @foobarld

    can you share the link/code?

  • Фото профиля Ethan Riley

    @E_RileyVR

    Love how you used :has() to create a seamless crossfade, especially with the mix-blend-mode trick!

  • Фото профиля Artemis & Atargatis

    @umangbagans

    Oh God, heavenly, beyond explainable

  • Фото профиля Drew🎭

    @Drew_the_Dev

    Omor