Skip to content

Instantly share code, notes, and snippets.

@DingWeizhe
Created June 7, 2016 15:54
Show Gist options
  • Save DingWeizhe/b28ddc656973467bcba6a34caae88f55 to your computer and use it in GitHub Desktop.
Save DingWeizhe/b28ddc656973467bcba6a34caae88f55 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div class="trans">
<span class="front">光鮮亮麗的外表</span>
<span class="back">不為人知的黑夜</span>
</div>
</body>
</html>
<style>
.trans{
}
.front, .back{
position: absolute;
font-size: 36px;
width: 300px;
left: 50%;
margin-left: -150px;
top: 50%;
margin-top: -25px;
}
.front{
display: inline-block;
animation-name: f;
animation-duration: 4s;
animation-delay: 2s;
transform-origin: 0px 7px;
transform: rotateX(359deg) rotate(10deg);
opacity: 0;
filter: blur(3px);
}
@keyframes f {
0% {transform: rotateX(0deg) rotate(0deg); opacity: 1; filter: blur(0);}
50% {opacity: 0;}
100% {transform: rotateX(359deg) rotate(10deg); opacity: 0; filter: blur(3px);}
}
.back{
position: absolute;
display: inline-block;
animation-name: b;
animation-duration: 4s;
transform-origin: 0 70px;
transform: rotateX(0deg) rotate(0deg);
opacity: 1;
filter: blur(0);
}
@keyframes b {
0% {transform: rotateX(360deg); opacity: 0; }
50% {transform: rotateX(180deg) rotate(5deg); opacity: 0; filter: blur(3px);}
100% {transform: rotateX(0deg) rotate(0deg); opacity: 1; filter: blur(0);}
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment