Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make "see through" text?

Tags:

html

css

I have body with a background-image and a div with background-color as white.

I'm trying to make the text on that div (which is called #content) see through, so that the text is like a window to the background of the site.

Here's an example:

enter image description here

like image 648
colzu Avatar asked Oct 29 '14 23:10

colzu


People also ask

How do I make text see through in Indesign?

Choose Window > Effects and, if necessary, open the Effects panel menu and choose Show Options. The Effects panel options are also available in the Effects dialog box (select an object and choose Object > Effects > Transparency) and, in simplified form, on the Control panel.

How do you make text see through in Photoshop?

Click anywhere on your image and type the text you want. With your text written out, double click on your text layer to open the Layer Style Panel. Under the 'Blending Options' tab, bring the Fill Opacity down to 0%. This will make your text completely invisible.


1 Answers

What you're trying to achieve is possible with CSS. With background-clip: text, you can use a background for the text but you will have to align it with the background of the page.

Here's an example:

body {
  background: url(http://o.homedsgn.com/wp-content/uploads/2011/04/NYC-at-Night-54.jpg) no-repeat;
  margin: 10px;
  background-position: center top;
}
h1 {
  background-color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  text-align: center;
  padding: 10px;
  font-weight: bold;
  font-family: arial;
  font-size: 83px;
  margin: 450px 0px 0px 0px; 
}
span {
  background: url(http://o.homedsgn.com/wp-content/uploads/2011/04/NYC-at-Night-54.jpg) no-repeat;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  display: block;
  background-position: center -450px;
}
<h1><span>NEW YORK</span></h1>
like image 97
Fahad Hasan Avatar answered Sep 24 '22 00:09

Fahad Hasan