Sibling Hover Interactions Directly In

Опубликовано: 24 Октябрь 2024
на канале: Brian Love
556
6

Hover interactions directly in Designer mode.

Notice, I am not in Preview mode or on the published site. Sure, this is possible in the states dropdown, but notice I am affecting the card on the right by hovering over the text links.

How is this possible?

Well, with a little bit of custom CSS and an embed element, you can create a pseudo-class on the text links that targets the card and changes a property on that card. Since all four elements are siblings, I can use the tilde (~) to find a sibling with the class of ".my-card".

For more examples and a full demonstration, check out the video on my channel.

   • View Sibling/Child Hover Interactions...