문제

So, i was coding something and idea comed to my mind. I couldn't get to the bottom of it, and figure out how to do it, so I'm hoping someone else is also interested. :)

Is it possible to do a Track matte (like in after effects) in CSS with text. So cut text of a div to see background of the bottom div. Like this:

text track matted

Is it even possible to do it only with code, without using images. So, thanks, best regards.

도움이 되었습니까?

해결책

Yep but only for webkits

Interesting is also:
http://www.hongkiat.com/blog/css-masking/

.backgroundclip h1 {
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background: url(http://bit.ly/1hRsB2d) no-repeat;
}

h1 {
  color: red;
}

Demo (as is in comment) on:
http://css-tricks.com/examples/ImageUnderText/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top