Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use text as a mask on background image

Tags:

html

css

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 do this in CSS or do I have to open up Photoshop?

like image 601
alexgolec Avatar asked Aug 12 '12 18:08

alexgolec


People also ask

How do I put text on a picture background?

On the Insert tab, in the Text group, click WordArt, click the style of text you want, and then type your text. Click the outside edge of the WordArt to select it, drag the text over your photo and then, if you want, rotate the text to the angle that works best for your photo.


1 Answers

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

like image 140
Moin Zaman Avatar answered Oct 21 '22 07:10

Moin Zaman