Skip to content

Instantly share code, notes, and snippets.

@veremey
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veremey/67c5d5c4bcde3ec915a2 to your computer and use it in GitHub Desktop.
Save veremey/67c5d5c4bcde3ec915a2 to your computer and use it in GitHub Desktop.
auto change bg css only
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>facectrl</title>
</head>
<body>
<div><span>gh</span>facectrl1</div>
</body>
</html>
html {
-webkit-animation: rainbow 10s infinite;}
body {
background-color: #1a5365;
}
html, body {
height: 100%;
}
div{
position: relative;
perspective: 300px;
width: 500px;
font-size: 70px;
text-align: center;
margin: 0 auto;
-webkit-mask-image: -webkit-linear-gradient(rgba(0,0,0,1) 48%, rgba(0,0,0,0.4)
78%);
}
span{
position: absolute;
top: 0;
left: 30px;
animation: spin 2s;
transform: rotatey(100deg);
}
@-webkit-keyframes rainbow {
100% { -webkit-filter: hue-rotate(360deg); }
}
@-webkit-keyframes spin {
0% { -webkit-transform: rotateY(0deg); }
40% { -webkit-transform: rotateY(360deg); }
}
@keyframes spin {
0% { transform: rotateY(0deg); }
40% { transform: rotateY(360deg); }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment