Use text as a mask on background image

前端 未结 4 670
鱼传尺愫
鱼传尺愫 2020-12-29 06:24

I have a nice background on my page, and I want my text header to act as a mask to cut through its containing div and have the background as a texture.

Can I

4条回答
  •  粉色の甜心
    2020-12-29 07:02

    Limited browser support, but background-clip can get you this effect: http://tympanus.net/Tutorials/ExperimentsBackgroundClipText/ (Hit the Animate buttons for more fun)

    Using SVG you can do it like this: http://people.opera.com/dstorey/images/newyorkmaskexample.svg (View source to see what is actually done, see reference article too)

    Using a background image and then CSS, you could do this: http://www.netmagazine.com/tutorials/texturise-web-type-css

提交回复
热议问题