- This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
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!
…and your Codepen demo is where…?
I followed Chris’ example for clipping
Doubtful if it would with a canvas
since a canvas is not a background or background-image.
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