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 text clipped background transition

Another effect that can be given to the text to make it look more decorative and prominent is the background Text-Transition property which has been explained in this tutorial.

Final output:
Please note: This text clipped background tranistion style works perfectly fine only in Google Chrome.

LET IT SNOW

Style assigned to the above text is as follows:

.masked
{
font-family:Arial, Helvetica, sans-serif;
font-size:100px;
font-weight:bold;
background: url(pic.png);
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
-webkit-animation-name: masked-animation;
-webkit-animation-duration: 5s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: linear;
}

In the above style, the png image file (The image can be in any other format as well), which we want to show as the background image of our text is saved in the same folder along with the CSS file and the HTML file.

  • The'-webkit-text-fill-color', helps specify the text-color for the text as transparent.
  • The '-webkit-background-clip' property used in code, causes the background image to clip to foreground text. The shape of the foreground content (transparent content in this case) is applied as a mask to clip background drawing.
  • The '-webkit-animation-name' helps us state the the type of animation (masked animation in this case).
  • '-webkit-animation-duration' sets the duration for the transition to 40sec.
  • '-webkit-animation-iteration-count' makes it execute an infinite times and lastly, '-webkit-animation-timing-function' allows the transition to change speed over its duration linearly .

@-webkit-keyframes 'masked-animation'
{
0% {background-position: left bottom;}
100% {background-position: left top;}
}

The @-webkit-keyframes 'masked-animation' in the above code has been used to provide animation. The next two lines indicate the position of the background in the beginning and towards the end of the animation.

Tags: CSS3 background clip, CSS3 clip background transition, CSS3 clipped background movement

 

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.