Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Dennis Castillo
16,018 PointsNeed help to understand about 3D on CSS
I need help to understand about text shadow on 3D, can someone explain how this code works?
width: 750px;
font-size: 100px;
margin: 125px auto;
text-align: center;
color: #fff;
text-shadow: 0px 1px 1px #ddd,
0px 2px 1px #d6d6d6,
0px 3px 1px #ccc,
0px 4px 1px #c5c5c5,
0px 5px 1px #c1c1c1,
0px 6px 1px #bbb,
0px 7px 1px #777,
0px 8px 3px rgba(100, 100, 100, 0.4),
0px 9px 5px rgba(100, 100, 100, 0.1),
0px 10px 7px rgba(100, 100, 100, 0.15),
0px 11px 9px rgba(100, 100, 100, 0.2),
0px 12px 11px rgba(100, 100, 100, 0.25),
0px 13px 15px rgba(100, 100, 100, 0.3);
Thanks and God Bless
1 Answer
James Barnett
39,199 PointsText-shadow works pretty similar to box-shadow, check out this Treehouse video on it.
There's no real magic here, there are a series of shadows that are exactly one pixel offset and using slightly different colors that are to create the effect of depth.
You might also be interested in checking out: