A Pen by Julian Shapiro on CodePen.
Created
January 14, 2015 14:40
-
-
Save wangwen1220/6d2c80b6a8674f12f2e3 to your computer and use it in GitHub Desktop.
Velocity.js - Feature: Transforms
This file contains 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
<p> | |
Refresh this page to re-run the demo. | |
</p> | |
<div> | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris. | |
</div> |
This file contains 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
/* jquery.js */ | |
/* jquery.velocity.js */ | |
// Animate two separate transform properties: rotateZ and translateX. | |
$("div").velocity({ | |
scale: 1.5, | |
translateX: 150 | |
}, 2000); |
This file contains 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
body { | |
font-family: "Helvetica Neue", Helvetica; | |
width: 90%; | |
font-weight: 200; | |
letter-spacing: 1px; | |
margin: 25px auto 0 auto; | |
background: rgb(234, 235, 235); | |
color: rgb(25, 25, 25); | |
} | |
div, p { | |
margin: 0 auto; | |
} | |
p { | |
color: rgb(125, 125, 125); | |
font-size: 0.85rem; | |
text-align: center; | |
margin-bottom: 17px; | |
} | |
div { | |
width: 500px; | |
overflow: hidden; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment