The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › change background image on width
Hi Guys,
Is it possible with css to change the background of a particular element when the width changes? I thought it would be something like this:
hand (width: 140px){ }
I’m trying to create a animation of a hand that disappears after the element has become so small that the hand sort of loses its grip.
Cheers!
Not with CSS specifically because it can’t detect individual element width.
You would need JS/JQ.
https://api.jquery.com/width/