Forums

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

Home Forums CSS Layered Text Clipping

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #199338
    Jerba
    Participant

    I’m having an issue with text clipping, basically I’m trying to overlay two containers and have the text on the top layer be transparent showing the contents of the div below…

    So, like this…

    `.below {
    // for example if this has a green background
    background-color: green;
    }

    .above {
    // and this has clipped text I want to be able to see the
    // green background of ‘.below’ via the transparent text in this div.
    }
    `

    I’ve tried a few ways and I can’t seem to get it working. I think i’m overlooking something obvious, but as of now I’m stuck!

    Thanks for any help!

    http://codepen.io/Responsive/pen/xbebrW

    #199341
    Paulie_D
    Member

    …and your Codepen demo is where…?

    #199342
    Paulie_D
    Member
    #199345
    Paulie_D
    Member

    Doubtful if it would with a canvas since a canvas is not a background or background-image.

    #199351
    Paulie_D
    Member

    Would it be possible if i recreated a similar effect with css animations?

    Doubtful, this effect relies, as I understand it, on a background (e.g. color or image) so that the text can be clipped to it.

    Perhaps a SVG mask or clip might be a better option.

    http://tutorials.jenkov.com/svg/clip-path.html#text-clip-paths

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