I have searched high and low for help on this both on this site and elsewhere but can't seem to figure out what is happening and why it's not working. I have been able to get it to work in Chrome, Safari, Opera, and IE. Would you be willing to take a look and help me out? I apologize if the code doesn't show correctly, this is my first post. (URL www.djopus.com)
.flexslider {
border: 0;
position: relative;
zoom: 1;
height: auto;
-webkit-animation:uplighting 10s; /* Chrome, Safari, Opera */
-moz-animation:uplighting 10s;
animation:myfirst 10s;
animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite;
-webkit-animation-iteration-count: infinite;
-o-animation-iteration-count: infinite;
}
/* Chrome, Safari, Opera */
#-webkit-keyframes uplighting
{
0% {-webkit-box-shadow: 0px 5px 65px 16px rgba(245,46,46,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(245,46,46,1);
box-shadow: 0px 5px 65px 16px rgba(245,46,46,1);}
20% {-webkit-box-shadow: 0px 5px 65px 16px rgba(245,245,46,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(245,245,46,1);
box-shadow: 0px 5px 65px 16px rgba(245,245,46,1);}
40% {-webkit-box-shadow: 0px 5px 65px 16px rgba(63,245,46,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(63,245,46,1);
box-shadow: 0px 5px 65px 16px rgba(63,245,46,1);}
60% {-webkit-box-shadow: 0px 5px 65px 16px rgba(0,255,242,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(0,255,242,1);
box-shadow: 0px 5px 65px 16px rgba(0,255,242,1);}
80% {-webkit-box-shadow: 0px 5px 65px 16px rgba(0,13,255,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(0,13,255,1);
box-shadow: 0px 5px 65px 16px rgba(0,13,255,1);}
90% {-webkit-box-shadow: 0px 5px 65px 16px rgba(221,0,255,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(221,0,255,1);
box-shadow: 0px 5px 65px 16px rgba(221,0,255,1);}
100% {-webkit-box-shadow: 0px 5px 65px 16px rgba(255,0,0,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(255,0,0,1);
box-shadow: 0px 5px 65px 16px rgba(255,0,0,1);}
}
#-moz-keyframes uplighting
{
0% {-webkit-box-shadow: 0px 5px 65px 16px rgba(245,46,46,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(245,46,46,1);
box-shadow: 0px 5px 65px 16px rgba(245,46,46,1);}
20% {-webkit-box-shadow: 0px 5px 65px 16px rgba(245,245,46,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(245,245,46,1);
box-shadow: 0px 5px 65px 16px rgba(245,245,46,1);}
40% {-webkit-box-shadow: 0px 5px 65px 16px rgba(63,245,46,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(63,245,46,1);
box-shadow: 0px 5px 65px 16px rgba(63,245,46,1);}
60% {-webkit-box-shadow: 0px 5px 65px 16px rgba(0,255,242,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(0,255,242,1);
box-shadow: 0px 5px 65px 16px rgba(0,255,242,1);}
80% {-webkit-box-shadow: 0px 5px 65px 16px rgba(0,13,255,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(0,13,255,1);
box-shadow: 0px 5px 65px 16px rgba(0,13,255,1);}
90% {-webkit-box-shadow: 0px 5px 65px 16px rgba(221,0,255,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(221,0,255,1);
box-shadow: 0px 5px 65px 16px rgba(221,0,255,1);}
100% {-webkit-box-shadow: 0px 5px 65px 16px rgba(255,0,0,1);
-moz-box-shadow: 0px 5px 65px 16px rgba(255,0,0,1);
box-shadow: 0px 5px 65px 16px rgba(255,0,0,1);}
}
/* Standard syntax */
#keyframes uplighting
{
0% {background:red;}
25% {background:yellow;}
50% {background:blue;}
100% {background:green;}
}
You forgot to change the name of animation from "myfirst" to "uplighting" :)
It's result of very complicated code which could be easily simplified. All the modern desktop browser support for animation without vendor-specific prefixes. You only need -webkit for Safari on some smartphones, if your really need it. For more detailed information refer the following article: Blink HTML text tag and its alternatives, CSS Animation compatibility is explained there.
So, CSS should be like the following:
.flexslider {
border: 0;
position: relative;
zoom: 1;
height: auto;
animation: uplighting 10s infinite;
}
#keyframes uplighting
{
0% { background: red }
25% { background: yellow }
50% { background: blue }
100% { background: green }
}
Try this and it you'll sure enjoy the result!
Related
I have created a scrollbar with 6 inset box-shadows and want these to change colour when I hover on the scrollbar. At the moment, when I hover on it, there is no change. Here is the code I have so far in CSS for the scrollbar:
::-webkit-scrollbar {
width: 20px;
}
::-webkit-scrollbar-track {
background-color: mediumpurple;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
box-shadow: 0px 100px 15px indigo inset, 0px -10px 10px indigo inset, 0px 250px 20px darkmagenta inset, 0px -20px 10px darkmagenta inset, 0px 400px 30px mediumorchid inset, 3px 650px 10px violet inset;
}
::-webkit-scrollbar-thumb:hover {
box-shadow: 0px 100px 15px transparent inset, 0px -10px 10px transparent inset, 0px 250px 20px transparent inset, 0px -20px 10px transparent inset, 0px 400px 30px transparent inset, 3px 650px 10px transparent inset, 0px 100px 15px violet inset, 0px - 10px 10px violet inset, 0px 250px 20px plum inset, 0px -20px 10px plum inset, 0px 400px 30px thistle inset, 3px 650px 10px lavender inset;
}
Well, everything here is looking fine, but you just missed a little point here. 0px - 10px 10px violet inset this line will make your whole box-shadow property invalid because it has a disorder in the second element, so you just have to fix this like this:
0px -10px 10px violet inset
Here is the full working code:
body {
height: 150vh;
}
::-webkit-scrollbar {
width: 20px;
}
::-webkit-scrollbar-track {
background-color: mediumpurple;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
box-shadow: 0px 100px 15px indigo inset, 0px -10px 10px indigo inset, 0px 250px 20px darkmagenta inset, 0px -20px 10px darkmagenta inset, 0px 400px 30px mediumorchid inset, 3px 650px 10px violet inset;
}
::-webkit-scrollbar-thumb:hover {
box-shadow: 0px 100px 15px transparent inset, 0px -10px 10px transparent inset, 0px 250px 20px transparent inset, 0px -20px 10px transparent inset, 0px 400px 30px transparent inset, 3px 650px 10px transparent inset, 0px 100px 15px violet inset, 0px -10px 10px violet inset, 0px 250px 20px plum inset, 0px -20px 10px plum inset, 0px 400px 30px thistle inset, 3px 650px 10px lavender inset;
}
i want to create a Inner-Shadow like on this website:
http://css-tricks.com/snippets/css/css-box-shadow/
But i want to have the shadows on the right and bottom side colored white.
I really have no more ideas.
Always when i click my button i only get the white shadow. So the white shadow overwrites the black?
Thats how far i am:
$('#button').mouseup(function () {
$('#button').removeClass('shadowBlack shadowWhite')
});
$('#button').mousedown(function() {
$('#button').addClass('shadowBlack shadowWhite')
});
.shadowBlack {
-webkit-box-shadow: inset 200px 200px 0px -186px rgba(0,0,0,1);
-moz-box-shadow: inset 200px 200px 0px -186px rgba(0,0,0,1);
box-shadow: inset 200px 200px 0px -186px rgba(0,0,0,1);
}
.shadowWhite {
-webkit-box-shadow: inset -200px -200px 0px -186px rgba(255,255,255,1);
-moz-box-shadow: inset -200px -200px 0px -186px rgba(255,255,255,1);
box-shadow: inset -200px -200px 0px -186px rgba(255,255,255,1);
}
Found it out:
.shadow{
-webkit-box-shadow: inset 9px 9px 15px 0px rgba(0,0,0,0.75).inset -10px -10px 15px 0px rgba(255,255,255,1);
-moz-box-shadow: inset 9px 9px 15px 0px rgba(0,0,0,0.75), inset -10px -10px 15px 0px rgba(255,255,255,1);
box-shadow: inset 9px 9px 15px 0px rgba(0,0,0,0.75), inset -10px -10px 15px 0px rgba(255,255,255,1);
}
$('#button').mouseup(function () {
$('#button').removeClass('shadowBlack shadowWhite')
});
$('#button').mousedown(function() {
$('#button').addClass('shadowBlack shadowWhite')
});
.shadowBlack {
-webkit-box-shadow: inset 200px 200px 0px -186px rgba(0,0,0,1);
-moz-box-shadow: inset 200px 200px 0px -186px rgba(0,0,0,1);
box-shadow: inset 200px 200px 0px -186px rgba(0,0,0,1);
}
.shadowWhite {
-webkit-box-shadow: inset -200px -200px 0px -186px rgba(255,255,255,1);
-moz-box-shadow: inset -200px -200px 0px -186px rgba(255,255,255,1);
box-shadow: inset -200px -200px 0px -186px rgba(255,255,255,1);
}
I want to alter the CSS of an element when the user hovers over another element - pure CSS no JS.
I am sure it's possible, i'm sure i've done it before....just can't get it to work now.
I have two DIVs.
One already has box shadow and the other not.
When the user hovers over the one with no shadow, I want that DIV to get box-shadow and the other one to lose it's shadow....And the vice versa to happen when the user takes mouse off the second DIV.
.div1 {background: #24D4F9;-webkit-box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);
-moz-box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);
box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);}
.div2{} /* No Shadwow */
.div2:hover {-webkit-box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);
-moz-box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);
box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);} /* This bit works */
.div2:hover .div1{-webkit-box-shadow: -3px 8px 29px 0px rgba(0,0,0,0);
-moz-box-shadow: -3px 8px 29px 0px rgba(0,0,0,0);
box-shadow: -3px 8px 29px 0px rgba(0,0,0,0);} /* This bit doesn't work */
What's the correct way to write the last bit?
Thanks
You need to change the order of the div's and then it is possible :)
http://jsfiddle.net/zcw8bdnq/
HTML:
<div class="div2">Test text div 2</div>
<div class="div1">Test text div 1</div>
CSS:
.div1, .div2 {
height: 100px;
margin-bottom: 30px;
}
.div1 {background: #24D4F9;-webkit-box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);
-moz-box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);
box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);}
.div2{}
.div2:hover + .div1 {-webkit-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0);
-moz-box-shadow: 0px 0px 0px 0px rgba(0,0,0,0);
box-shadow: 0px 0px 0px 0px rgba(0,0,0,0);}
.div2:hover {-webkit-box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);
-moz-box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);
box-shadow: -3px 8px 29px 0px rgba(0,0,0,0.75);}
I was working on a small JSfiddle which i have almost completed , Jsfiddle here it has a glitch though , if you notice there are 2 hover effects , Look below :
img {
-webkit-transition: all .4s ease-out 0s;
-moz-transition: all .4s ease-out 0s;
transition: all .4s ease-out 0s;
position: relative;
top: 0px;
-webkit-box-shadow: -5px 34px 37px -13px rgba(0,0,0,0.8);
-moz-box-shadow: -5px 34px 37px -13px rgba(0,0,0,0.8);
box-shadow: -5px 34px 37px -13px rgba(0,0,0,0.8);
}
img:hover {
top: -15px;
-webkit-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
-moz-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
}
and the 2nd hover effect here
.fancyborder {
-webkit-transition: all .4s ease-out 0s;
-moz-transition: all .4s ease-out 0s;
transition: all .4s ease-out 0s;
border-bottom: 5px solid #444;
}
.fancyborder:hover {
border-bottom: 5px solid #65d125;
}
this works perfectly fine . One problem though is that want the effect to take place as soon as i hover the entire .col-md-3 div i.e. i want both the :hover effects to fire as soon as i hover over the div.
The seemingly obvious solution : Now the seemingly obvious solution might be to do this
.col-md-3 {
top: -15px;
-webkit-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
-moz-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
border-bottom: 5px solid #65d125;
}
The problem with this is obvious , this will apply the shadow property , the top:-15px and border-bottom to col-md-3 rather than img and span tags respectively .
Is there any complex CSS selection here that i can apply or some intelligent HTML i can write that will acheive what i want to . I know i am missing something really tiny here , but i have't been able to spot what it is .
Please guide me . you help will be appreciated.
Thank you .
Gautam.
I want both the :hover effects to fire as soon as i hover over the
<div class="col-md-3 ">
Then you could use :hover pseudo-class on .col-md-3 at first and target the two other elements as follows:
.down-border:hover img {
top: -15px;
-webkit-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
-moz-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
}
.down-border:hover .fancyborder {
border-bottom:5px solid #65d125;
}
HTML
<div class="col-md-3 down-border">
Note: I've used .down-border selector instead of .col-md-3 in order to select the div element because using .col-md-3 may affect the other columns.
EXAMPLE HERE
You need to add the hover to the parent:
.col-md-3:hover img {
top: -15px;
-webkit-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
-moz-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
}
.col-md-3:hover .fancyborder {
border-bottom:5px solid #65d125;
}
Fiddle
Change in the CSS:
.col-md-3:hover .fancyborder {
border-bottom: 5px solid #65d125;
}
.col-md-3:hover img {
top: -15px;
/*background-color: red;*/
-webkit-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
-moz-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
}
Apply your style like below.
.col-md-3:hover img{
top: -15px;
-webkit-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
-moz-box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
box-shadow: -5px 44px 37px -13px rgba(0,0,0,0.5);
}
.col-md-3:hover .fancyborder {
border-bottom:5px solid #65d125;
}
DEMO
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:
Fiddle
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);
}
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
figure {
transform-origin:center center;
transform-style:preserve-3d;
transform: rotate3d(-1,0,0,-72deg);
}
1- REAL 3D USING JQUERY cross browser compatibility solution(prefixfree)
3D DEMO with Jquery
MARKUP
<figure></figure>
JS
var shadowLength = 40;
for(var i = 0;i < shadowLength; i++){
var layer = $("<h1>3D TEXT</h1>").css("transform", "translateZ(-"+i+"px)");
$("figure").append(layer);
}
CSS
* { box-sizing:border-box; }
:root{
background-color: #00dbba;
overflow:hidden;
text-align:center;
}
figure {
transform-origin:center center;
transform-style:preserve-3d;
transform: rotate3d(-1,0,0,-72deg);
}
h1:first-child{
color:white;
}
h1 {
display:block;
width:100%;
padding:40px;
line-height:1.5;
font:900 8em 'Concert One', sans-serif;
text-transform:uppercase;
position:absolute;
color:#51B3A3;
}
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.
figure {
transform-origin:center center;
transform-style:preserve-3d;
transform: rotateZ(0deg) rotateX(70deg) rotateY(-12deg);
}
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
figure#figure3d {
-webkit-transform: rotateX(54deg) scale(1) skew(10deg) translate3d(0px, 0px, 0px);
-webkit-transform-origin:center center;
-webkit-transform-style:preserve-3d;
}
you can remove the span if you don't like the animation at the beginning
span{
display:none;/*comment me to remove the animation*/
}
3- IN GENERAL
3D DEMO with animation
or change the angle like this
-webkit-transform:rotate3d(-1,1,0,40deg);
3D DEMO without animation
#figure3d span {
color:silver;
-webkit-text-shadow: 0px 1px 0px #c0c0c0, 0px 2px 0px #b0b0b0, 0px 3px 0px #a0a0a0, 0px 4px 0px #909090, 0px 5px 10px rgba(0, 0, 0, 0.6);
-moz-text-shadow: 0px 1px 0px #c0c0c0, 0px 2px 0px #b0b0b0, 0px 3px 0px #a0a0a0, 0px 4px 0px #909090, 0px 5px 10px rgba(0, 0, 0, 0.6);
-ms-text-shadow: 0px 1px 0px #c0c0c0, 0px 2px 0px #b0b0b0, 0px 3px 0px #a0a0a0, 0px 4px 0px #909090, 0px 5px 10px rgba(0, 0, 0, 0.6);
text-shadow: 0px 1px 0px #c0c0c0, 0px 2px 0px #b0b0b0, 0px 3px 0px #a0a0a0, 0px 4px 0px #909090, 0px 5px 10px rgba(0, 0, 0, 0.6);
}
* { -webkit-box-sizing:border-box; }
figure#figure3d {
-webkit-transform: rotate(0deg) scale(1) skew(0deg) translate3d(0px, 0px, 0px);
-webkit-transform-origin:center center;
-webkit-transform-style:preserve-3d;
}
4- USING ONLY CSS
the max you can do using text-shadow only ist something like this
#figure3d {
-webkit-transform: rotateX(65deg) scale(1) skew(10deg) translate3d(0px, 0px, 0px);
-webkit-transform-origin: center center;
-webkit-transform-style: preserve-3d;
font-size:3.6em;
letter-spacing:10px;
font-family: 'Alfa Slab One', cursive;
font-weight:900;
color:white;
text-shadow: -1px 1px 0 #51B3A3,
-2px 2px 0 #51B3A3,
-2px 3px 0 #51B3A3,
-2px 5px 0 #51B3A3,
-2px 7px 0 #51B3A3,
-2px 8px 0 #51B3A3,
-2px 10px 0 #51B3A3,
-2px 11px 0 #51B3A3,
-3px 13px 0 #51B3A3,
-3px 14px 0 #51B3A3,
-3px 16px 0 #51B3A3,
-3px 17px 0 #51B3A3,
-4px 19px 0 #51B3A3,
-4px 20px 0 #51B3A3,
-4px 22px 0 #51B3A3,
-4px 23px 0 #51B3A3,
-4px 25px 0 #51B3A3,
-4px 26px 0 #51B3A3,
-5px 28px 0 #51B3A3,
-5px 29px 0 #51B3A3;
}
3D DEMO with text-shadow only
you can then ajust it as you like!
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:
<div id="wrapper" contenteditable="true" spellcheck="false">
<p>Where</p>
<p>are the</p>
<p>trees</p>
</div>
CSS:
#import url(http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz:bold);
/* Global ------------------------------------------------------ */
html {
height: 100%;
font: 62.5%/1 "Lucida Sans Unicode","Lucida Grande",Verdana,Arial,Helvetica,sans-serif;
background: url(http://s.cdpn.io/79/glow.png) no-repeat center center,
url(http://s.cdpn.io/79/tilt-shift.jpg) no-repeat center center;
background-size: auto, cover;
}
body {
display: flex;
justify-content: center;
align-items: center;
margin: 0;
width: 100%;
height: 100%;
text-align: center;
background-color: hsla(30,20%,95%,.9);
}
/* Wrapper ------------------------------------------------------ */
#wrapper {
position: relative;
text-align: center;
font-weight: bold;
font-family: "Yanone Kaffeesatz", "Lucida Grande", Lucida, Verdana, sans-serif;
margin: 0 auto;
width: 600px;
padding: 7em 0;
background: url(http://s.cdpn.io/79/tilt-shift.jpg) no-repeat center center;
border-radius: 4px;
box-shadow: inset 0 -1px 0 hsla(0,0%,0%,.2), 0 21px 8px -12px rgba(0,0,0,.2);
perspective: 350;
}
#wrapper:focus {
outline: none;
}
#wrapper p {
font-size: 10em;
margin: 0;
color: #fff;
text-transform: uppercase;
letter-spacing: 0.03em;
text-shadow: rgba(0,0,0,0.1) 0 20px 80px;
-webkit-transition: -webkit-transform .1s ease-in; /* only WebKit because of performance */
}
/* Hover ------------------------------------------------------ */
#wrapper:hover p {
color: hsla(0,0%,0%,0);
transform: rotate(6.5deg) rotateX(28deg) skewX(-4deg);
-webkit-transition: -webkit-transform .1s ease-out; /* only WebKit because of performance */
}
#wrapper:hover p:nth-child(1) {
font-size: 9em;
text-shadow: #fff 0 0 10px,
#fff 0 4px 3px, #ddd 0 9px 3px, #ccc 0 12px 1px,
rgba(0,0,0,0.2) 0 14px 5px, rgba(0,0,0,0.1) 0 20px 10px,
rgba(0,0,100,0.2) 0 15px 80px;
text-indent: 0.3em;
}
#wrapper:hover p:nth-child(2) {
font-size: 10em;
text-shadow: #fff 0 0 1px,
#eee 0 4px 3px, #ddd 0 9px 3px, #ccc 0 12px 1px,
rgba(0,0,0,0.2) 0 14px 3px, rgba(0,0,0,0.1) 0 20px 10px,
rgba(0,0,100,0.2) 0 15px 80px;
}
#wrapper:hover p:nth-child(3) {
font-size: 11em;
text-shadow: #fff 0 0 2px,
#fff 0 4px 5px, #ddd 0 9px 5px, #ccc 0 12px 10px,
rgba(0,0,0,0.2) 0 14px 5px, rgba(0,0,0,0.1) 0 20px 10px,
rgba(0,0,100,0.2) 0 15px 80px;
}
/* Middle ------------------------------------------------------ */
#wrapper p:nth-child(2):hover {
text-shadow: #fff 0 -5px 1px,
#eee 0 -1px 3px, #ddd 0 4px 3px, #ccc 0 7px 1px,
rgba(0,0,0,0.2) 0 15px 5px, rgba(0,0,0,0.1) 0 20px 10px,
rgba(0,0,0,0.2) 0 15px 80px;
}
#wrapper p:nth-child(2):active {
text-shadow: rgba(0,0,0,0.2) 0 14px 5px, rgba(0,0,0,0.1) 0 20px 10px,
rgba(0,0,0,0.2) 0 15px 80px;
}
#wrapper p::selection {
background-color: red;
}
You can get an aproximate result setting a rotation with perspective:
display: inline-block;
-webkit-transform: perspective(200px) rotateX(20deg);
-webkit-transform-origin: 30% bottom;
transform: perspective(60px) rotateX(23deg);
transform-origin: 30% bottom;
fiddle
I set the display to inline-block so that the perspective is centered, otherwise it is skewed.