PSD-HTML. These Pixel perfect HTML pages will be tested on Chrome, Firefox, IE, Safari on OS X and Windows Imajine will help you create your own fan page in facebook with an eye appealing graphic banner for its welcome page Custom CMS theme building weboranje.com - showcase of inspirational web 2.0 websites
CSS3 tutorial to clip an image as text background

Final output :
Please note:This masking / clipping an image as text background works perfectly fine only in Google Chrome.

STARRY NIGHT

An interesting way by which a fine visual representation of text can be attained is the masking of the text. This tutorial explains how we can obtain this effect.

The style used:

.textmasked
{
font-family:Arial, Helvetica, sans-serif;
font-size:80px;
font-weight:bold;
background: url(text_bg.png);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
}

Explanation:

  • '-webkit-text-fill-color', has been used to specify the text-color for the text as transparent.
  • '-webkit-background-clip property' used to clip the background image to foreground text.
    The shape of the foreground content (transparent content in this case) is applied as a mask to clip background. The png image file (The image can be in any format) which we want to see through our text , should be saved along with the CSS file and HTML file in the same folder.

Hence, with the help of a mere 6 line code, we can get this effect. Simply clipped. :)

Tag: CSS3 tutorial to mask text, CSS3 tutorial to clip an image as text background.

 

Bookmark and Share
HI, AM JAY, AND I IMAJINE
I am a freelance web designer and web application developer with over 7 years of result oriented experience. I am accustomed to working in a dynamic and goal oriented client environment. My strengths include the ability to visualize, personalize and create a truly unique and enthralling web presence. My passion apart from web design, logo design, Flash animation / actionscripting, CMS Customization, print and web development includes photography, game programming, tutorial development (includes Adobe Flash, Adobe Fireworks and Adobe Photoshop) and blogging.
Read more about me...
CONTACT US
Name :  
Email Address :  
 
Comments :
 
jayanthi.varma@imajine.in  |  © 2008 - 2012 Imajine.