Hi everyone, I wrote a litle piece about a trick that scratches some itches
There’s a way to target any element from an interaction, that I’m using for a long time and works quite well.
Hi everyone, I wrote a litle piece about a trick that scratches some itches
There’s a way to target any element from an interaction, that I’m using for a long time and works quite well.
That is amazing!
Now, without using this trick, almost anything is possible in targeting elements with interactions, but you have to think it before starting to build a structure and give class names to elements.
…Exactly!! Plan before you start!
Ah this is somewhat similar to the nested children selector hack using richtext editor.
Say that again ?
I hereby name this:
To create a CSS class like these so that you can style all links/images inside an element:
.my-section a { ... }
.my-section img { ... }
Create a dummy richtext editor with class mysection
, add an image, then you will be able to style the images within the section.
Now add the class mysection
to a normal div. All images in there will still function the same way.
http://webflow-tricks.webflow.io/how-to-add-hover-zoom-to-rich-text
https://preview.webflow.com/preview/sandbox-903b9c?preview=2a77d4d5446ddad097abb9bf8603288b
Note that this only works for elements that can be placed inside rich text:
Woaw, that’s totally a “webflow secret” material
Great to know… it’s possible that I had stumble upon this by accident without understanding it.