3D CSS Shadow Text Tutorial
52 Comments
This easy CSS text shadow tutorial will show you step by step how to create 3D font with multiple css shadows by stacking multiple CSS3 text shadow properties, then go a step further and use the CSS text transform and CSS transition properties to make the 3D text pop out / zoom on hover!
Please keep in mind this 3D CSS text shadow effect is pure CSS (No JavaScript) and the technique only fully works in modern browsers like Firefox, Chrome, Safari and Opera, It will fall back gracefully to plain text when viewed in any Internet Explorer browser.
How CSS shadow text works
To create this 3D CSS shadow text effect we are going to use the CSS 3 text-shadow property, this is how text-shadow works:
.example-class { text-shadow: [X offset] [Y offset] [Blur size] [Colour]; }
Stacking multiple CSS Shadows
You don’t have to stack multiple css shadows but it does create a better looking 3D CSS text effect.
The Tutorial (Creating the 3D CSS text shadow)
You will want to pick colours darker than the original text colour for the shadow, so for this example I will be using white text, with a 2 level deep grey shadow, followed by a 4 level deep near black shadow to create that 3D text illusion.
For this example I’m going to target a H2 tag, but you can target any HTML element, link, class, ID etc.
h2 { text-shadow: 1px 1px 0 #CCC, 2px 2px 0 #CCC, /* end of 2 level deep grey shadow */ 3px 3px 0 #444, 4px 4px 0 #444, 5px 5px 0 #444, 6px 6px 0 #444; /* end of 4 level deep dark shadow */ }
Well, you can stop there if you like, you have your basic 3D CSS text illusion, using multiple shadows.
However, let’s go two steps further and make the text size increase on hover by using the CSS text transform property to have the 3D text pop out / zoom in & out on hover! Then have it fade in and out smoothly with a CSS transition, pure CSS3, no JavaScript required!
Increasing text size on hover with CSS text transform
h2:hover { /* CSS3 Transform Effect */ -webkit-transform: scale(1.2); /* Safari & Chrome */ -moz-transform: scale(1.2); /* Firefox */ -o-transform: scale(1.2); /* Opera */ }
You can make the text bigger by changing the (1.1) value, (2.0) would be double the original size.
This instant CSS text transform on hover could use some improvement however, so we are going to make it fade in and fade out over a few milliseconds.
Making the cSS transition on hover smooth
h2 { /* CSS3 Transition Effect */ -webkit-transition: all 0.12s ease-out; /* Safari & Chrome */ -moz-transition: all 0.12s ease-out; /* Firefox */ -o-transition: all 0.12s ease-out; /* Opera */ }
Now the text size grows larger on hover and goes back to it’s normal state in a smooth CSS transition, you can increase or lower the speed by changing the 0.12s value.
View Demo That’s it! You’ve created your 3D CSS shadow text effect with multiple css shadows!
Share or Save!
its really that easy thanks
[...] If you want more details of how it works, check-out the tutorial by pgwebdesign [...]
[...] … and many other fun effects using a CSS->Canvas converter (CSS sourced from Line25, and Stereoscopic, and Shadow 3D) [...]
[...] 26. 3D CSS Shadow Text Tutorial [...]
[...] differs from others because besides default text-shadow it also uses inner shadow property.26. 3D CSS Shadow Text TutorialThis easy CSS text shadow tutorial will show you step by step how to create 3D font with multiple [...]
[...] 26. 3D CSS Shadow Text Tutorial [...]
Yeah during the animation the shadow effects arent there…. ‘nice’.
If you move the mouse quickly from on/off the text you can see it is merely white text with the drop shadow when it is :active?
I’m not sure…
[...] To get things started, let’s see how <canvas> can emulate CSS effects. Searching through Google images for “css text-shadow” led to a few great demos for us to emulate; Line25, and Stereoscopic, and Shadow 3D. [...]
good tutorial

Thank you for this. I haven’t seen much on using multiple shadows. You made it super easy to understand :)
[...] Source Demo [...]
[...] 13、3D CSS3阴影文字教程 3D CSS阴影文字教程 [...]
[...] was made in Photoshop 11. CSS Custom Fonts Tutorial 12. I Heart Blur 13. 3D CSS Shadow Text Tutorial 14. How to Create Inset Typography with CSS3 15. How to Create a Cool [...]

Excellent tutorial! I had never thought of using multiple text shadows to create a smooth 3D effect like that.
[...] 3D CSS Shadow Text Tutorial 35 Fantasy Art Masterpieces of character design history [...]
[...] 26. 3D CSS Shadow Text Tutorial [...]
[...] 13、3D CSS3阴影文字教程 3D CSS阴影文字教程 [...]
[...] 3D CSS Shadow Text Tutorial [...]

I like to use css3, but its to risk, because not all browser support css3. Can you give me suggestion?
[...] 3D CSS Shadow Text Tutorial - Ever wonder how to make your header text look 3D and pop out with you hover your mouse over it? Try this phenomenal tutorial! Keep in mind that this could also be a great effect for header text. [...]
[...] 26. 3D CSS Shadow Text Tutorial [...]
thanks, good effect for website design
Great tutorial but does not work in i.e. Do you have a solution for i.e?
[...] 13. 3D CSS Shadow Text Tutorial [...]
[...] 3D CSS Shadow Text Tutorial [...]
[...] 13. 3D CSS Shadow Text Tutorial [...]
I don’t even know how I finished up here, but I believed this submit used to be great. I do not understand who you’re but definitely you’re going to a well-known blogger should you aren’t already. Cheers!
Love your pics thanks for all the tips I see yove been yousing weebly great site.
[...] 6) 3D CSS Shadow Text [Tutorial] [...]
[...] 教程 / 演示 [...]
[...] 3D CSS Shadow Text [Tutorial] [...]
Very nice,looking for this
[...] Visit Source – by PG Web Design [...]
[...] 下面这篇教程是教你如何用CSS3来制作3D效果的文字,文章翻译自3D CSS Shadow Text Tutorial。 [...]
[...] 3D CSS Sombra Tutorial Texto [...]
[...] Xem Hướng Dẫn [...]
Incredible, great web site composition! The best way extended were you blogging and site-building with regard to? you will be making posting glance simple. The entire glance of one’s website is great, let alone necessary . material!
[...] 26. 3D CSS Shadow Text Tutorial [...]
[...] 教程 / 演示 [...]
[...] Source Demo [...]
[...] 3D CSS Shadow Text Tutorial [...]
Hey, you used to write amazing, but the last couple of posts have been kinda boring I miss your tremendous writings. Past couple of posts are just a little out of track! come on! eeaaddbfdefk
I just like the helpful information you provide on your articles. I will bookmark your blog and test once more here frequently. I’m moderately certain I will learn many new stuff right here! Best of luck for the next! fdebekckeebg
[...] 20. 3D CSS Shadow Text TutorialCreate 3D font with multiple CSS shadows by stacking multiple CSS3 text shadow properties, then go a step further and use the CSS text transform and CSS transition properties to make the 3D text zoom on hover. [...]
[...] 6) 3D CSS Shadow Text [Tutorial] [...]
Hello, I wish for to subscribe for this web skte to take
most recent updates, therefore where cann i do it please help.
Feell free to surf to my page - website design & development proposal
Excellent goods from you, man. I have understand your stuff previous to and you’re just extremely great.
I actually like what you have acquired here, really like
what you’re saying and the way in which you say it.
You make it entertaining and you still care for to keep it sensible.
I can not wait to read far more from you. This is really a
wonderful site.
If you are going for most excellent contents like me, just visit this site daily as it presents feature contents, thanks
[...] and blue channels. The text can be seen using a 3D glass and hence offers great after use value.3D CSS Shadow Text TutorialText Shadow is one of the important aspects of the text. With this tutorial, you can create 3D CSS [...]
52 Comments [ Leave a comment ]