Last active
September 20, 2016 20:10
-
-
Save mgrigajtis/b2f1a4c737cd589d851afae731f22f1f to your computer and use it in GitHub Desktop.
An example of flashy HTML 5 effects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Ken Burns Effect</title> | |
<link rel="stylesheet" type="text/css" href="kenburnseffect.css"> | |
<link rel="stylesheet" type="text/css" href="flip-button.css"> | |
</head> | |
<body> | |
<div class="pic-wrapper"> | |
<figure class="pic-1"></figure> | |
<figure class="pic-2"></figure> | |
<figure class="pic-3"></figure> | |
<figure class="pic-4"></figure> | |
</div> | |
<div id="content"> | |
<div class="flip-button col-md-4"> | |
<div class="flip-button-back"> | |
<p>Are you sure you want to do this activity?</p> | |
<button id="btnYesTransferGoals" class="yes">Yes</button> | |
<button class="no">No</button> | |
</div> | |
<div class="flip-button-front">Save</div> | |
</div> | |
</div> | |
<script type="text/javascript" src="flip-button.js"></script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@keyframes | |
slideShow { 0% { | |
opacity: 0; | |
transform:scale(1) rotate(0.1deg); | |
-ms-transform:scale(1) rotate(0.1deg); | |
} | |
5% { | |
opacity: 1 | |
} | |
25% { | |
opacity: 1; | |
} | |
30% { | |
opacity: 0; | |
transform:scale(1.1) rotate(0.1deg); | |
-ms-transform:scale(1.1) rotate(0.1deg); | |
} | |
100% { | |
opacity: 0; | |
transform:scale(1) rotate(0.1deg); | |
-ms-transformm:scale(1) rotate(0.1deg); | |
} | |
} | |
@-o-keyframes | |
slideShow { 0% { | |
opacity: 0; | |
-o-transform:scale(1); | |
} | |
5% { | |
opacity: 1 | |
} | |
25% { | |
opacity: 1; | |
} | |
30% { | |
opacity: 0; | |
-o-transform:scale(1.1); | |
} | |
100% { | |
opacity: 0; | |
-o-transformm:scale(1); | |
} | |
} | |
@-moz-keyframes | |
slideShow { 0% { | |
opacity: 0; | |
-moz-transform:scale(1); | |
} | |
5% { | |
opacity: 1 | |
} | |
25% { | |
opacity: 1; | |
} | |
30% { | |
opacity: 0; | |
-moz-transform:scale(1.1); | |
} | |
100% { | |
opacity: 0; | |
-moz-transformm:scale(1); | |
} | |
} | |
@-webkit-keyframes | |
slideShow { 0% { | |
opacity: 0; | |
-webkit-transform:scale(1); | |
} | |
5% { | |
opacity: 1 | |
} | |
25% { | |
opacity: 1; | |
} | |
30% { | |
opacity: 0; | |
-webkit-transform:scale(1.1); | |
} | |
100% { | |
opacity: 0; | |
-webkit-transformm:scale(1); | |
} | |
} | |
* { | |
margin: 0; | |
padding: 0; | |
} | |
.pic-wrapper { | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
overflow: hidden; | |
} | |
figure { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
opacity: 0; | |
/*animation*/ | |
animation: slideShow 24s linear infinite 0s; | |
-o-animation: slideShow 24s linear infinite 0s; | |
-moz-animation: slideShow 24s linear infinite 0s; | |
-webkit-animation: slideShow 24s linear infinite 0s; | |
} | |
.pic-1 { | |
opacity: 1; | |
background: url(pic1.jpg) no-repeat center center; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} | |
.pic-2 { | |
animation-delay: 6s; | |
-o-animation-delay: 6s; | |
-moz--animation-delay: 6s; | |
-webkit-animation-delay: 6s; | |
background: url(pic2.jpg) no-repeat center center; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} | |
.pic-3 { | |
animation-delay: 12s; | |
-o-animation-delay: 12s; | |
-moz--animation-delay: 12s; | |
-webkit-animation-delay: 12s; | |
background: url(pic3.jpg) no-repeat center center; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} | |
.pic-4 { | |
animation-delay: 18s; | |
-o-animation-delay: 18s; | |
-moz--animation-delay: 18s; | |
-webkit-animation-delay: 18s; | |
background: url(pic4.jpg) no-repeat center center; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment