Morphing Images using CSS
trying out stuff seen on http://css3.bradshawenterprises.com/cfimg/
A Pen by Saijo George on CodePen.
<div id="mainlogo"> | |
<img class="logobottom" src="http://saijogeorge.com/brand-style-guide-examples/images/bbc.png" /> | |
<img class="logotop" src="http://saijogeorge.com/brand-style-guide-examples/images/tuts.png" /> | |
</div> |
trying out stuff seen on http://css3.bradshawenterprises.com/cfimg/
A Pen by Saijo George on CodePen.
// Full Article : http://css3.bradshawenterprises.com/cfimg/ |
@-webkit-keyframes logomorph { | |
0% { | |
opacity:1; | |
} | |
25% { | |
opacity:1; | |
} | |
75% { | |
opacity:0; | |
} | |
100% { | |
opacity:0; | |
} | |
} | |
@-moz-keyframes logomorph { | |
0% { | |
opacity:1; | |
} | |
25% { | |
opacity:1; | |
} | |
75% { | |
opacity:0; | |
} | |
100% { | |
opacity:0; | |
} | |
} | |
@-o-keyframes logomorph { | |
0% { | |
opacity:1; | |
} | |
25% { | |
opacity:1; | |
} | |
75% { | |
opacity:0; | |
} | |
100% { | |
opacity:0; | |
} | |
} | |
@keyframes logomorph { | |
0% { | |
opacity:1; | |
} | |
25% { | |
opacity:1; | |
} | |
75% { | |
opacity:0; | |
} | |
100% { | |
opacity:0; | |
} | |
} | |
#mainlogo { | |
position:relative; | |
height:281px; | |
width:450px; | |
margin:0 auto; | |
} | |
#mainlogo img { | |
position:absolute; | |
left:0; | |
} | |
#mainlogo img.logotop { | |
-webkit-animation-name: logomorph; | |
-webkit-animation-timing-function: ease-in-out; | |
-webkit-animation-iteration-count: infinite; | |
-webkit-animation-duration: 5s; | |
-webkit-animation-direction: alternate; | |
-moz-animation-name: logomorph; | |
-moz-animation-timing-function: ease-in-out; | |
-moz-animation-iteration-count: infinite; | |
-moz-animation-duration: 5s; | |
-moz-animation-direction: alternate; | |
-o-animation-name: logomorph; | |
-o-animation-timing-function: ease-in-out; | |
-o-animation-iteration-count: infinite; | |
-o-animation-duration: 5s; | |
-o-animation-direction: alternate; | |
animation-name: logomorph; | |
animation-timing-function: ease-in-out; | |
animation-iteration-count: infinite; | |
animation-duration: 5s; | |
animation-direction: alternate; | |
} |