css help

Out of context: Reply #11

  • Started
  • Last post
  • 13 Responses
  • ok_not_ok0

    css noob here!

    So is it possible to move a div mask without moving the image being masked?

    here's my noob code:

    #myMask{left:0;top:0;position:re... overflow:"hidden"}
    #myImage{left:0;top:0;position:a...

    <div id="myMask">
    <img src="pr0n.jpg" id="myImage">
    </div>

    This masks the image but when I animate the mask the image moves with it.

    Can anyone help a brother out?

    • I’m guessing the logic here is that “0” declared on #myImage is relative to its parent #myMasknb
    • yes sir!ok_not_ok
    • Throw this in codependbloc
    • Oh I see. You knew what I was saying. Hmmm I’ve exhausted my css knowledge. Hmmmm SVG mask?nb

View thread