Whether it is possible tilt, rotate, shrink 3d text? I want to create an effect of bottom view on my text (or if text lies on a table) using only CSS. Is it possible? I do not mean the animation, only static effect. I can do it in the 3dsMAX or PhotoShop, but I want to know how it can be implemented in CSS.
I have:
I want:
I got a little bit this effect (due to the large shadow). But I want to make it more clear and explicit. Further increase in the shade does not enhance the effect. I need to tilt and compress vertically my text. What styles can help me in this?
I would be grateful for any ideas!
My shadow styles:
text-shadow: 0px 0px 0 rgb(221,120,128),
-1px 1px 0 rgb(215,114,122),
-2px 2px 0 rgb(209,108,116),
-3px 3px 0 rgb(203,102,110),
-4px 4px 0 rgb(197,96,104),
-5px 5px 0 rgb(191,90,98),
-6px 6px 0 rgb(185,84,92),
-7px 7px 0 rgb(178,77,85),
-8px 8px 0 rgb(172,71,79),
-9px 9px 0 rgb(166,65,73),
-10px 10px 0 rgb(160,59,67),
-11px 11px 0 rgb(154,53,61),
-12px 12px 0 rgb(148,47,55),
-13px 13px 0 rgb(142,41,49),
-14px 14px 0 rgb(136,35,43),
-15px 15px 0 rgb(130,29,37),
-16px 16px 15px rgba(0,0,0,0.6),
-16px 16px 1px rgba(0,0,0,0.5),
0px 0px 15px rgba(0,0,0,.2);
}
3
Answers
I think this is what you’re referring to (Fiddle). The transform selector is going to be your friend in this situation, i.e.
transform: rotate(6.5deg) rotateX(188deg) skewX(-25deg)
.HTML:
CSS:
You can get an aproximate result setting a rotation with perspective:
fiddle
I set the display to inline-block so that the perspective is centered, otherwise it is skewed.
that is not easy i think you will need js for that,unfortunately css text-shadow property is only 2 dimensional. Here is a quick example, use your keyboard to controll the angle
0- REAL 3D USING ONLY CSS cross browser compatibility solution(prefixfree)
For Cross-browser gradients
(NO -webkit-,-moz-,-ms-)
save your time using LeaVerou/prefixfree
you can find a CDN Version here
3D DEMO with prefixfree & CSS only
1- REAL 3D USING JQUERY cross browser compatibility solution(prefixfree)
3D DEMO with Jquery
MARKUP
JS
CSS
you can now choose the position by changing the value of
rotateZ(Value deg) rotateX(Value deg) rotateY(Value deg)
to get the perfect position.deep understanding css3D
Read how Nesting 3D Transformed Elements Works
and don’t miss [CSSconf.eu 2013] Ana-Maria Tudor: Maths-powered transforms for creating 3D shapes
if you need more, read
1- css-3d-animation-how
2- Ana-Maria Tudor on stackoverflow
2- REAL 3D
3D DEMO with animation
you can remove the span if you don’t like the animation at the beginning
3- IN GENERAL
3D DEMO with animation
or change the angle like this
3D DEMO without animation
4- USING ONLY CSS
the max you can do using text-shadow only ist something like this
3D DEMO with text-shadow only
you can then ajust it as you like!