The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS use percentage height of div for translate3d

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #240273


    i am trying to animate a text-overlay, which should reveal part its content via a translate3d-transform.
    The “caption-title” div should be always visible.
    The “caption-copy” div should only be revealed on click.

    i created a working pen here:

    However this example just uses estimates of the divs height and uses % values.
    Is there a clever way to do this with the precise height-value of the “caption-copy”-div just by css, or do I need to calculate all sizes via JS?


Viewing 1 post (of 1 total)
  • The forum ‘CSS’ is closed to new topics and replies.