Skip to content
This repository has been archived by the owner on Feb 17, 2021. It is now read-only.

Commit

Permalink
fade in transition for bubble
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordon Koo committed Aug 28, 2012
1 parent 0b09e72 commit db7c2bb
Show file tree
Hide file tree
Showing 4 changed files with 348 additions and 40 deletions.
234 changes: 234 additions & 0 deletions css/fade.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,234 @@
@anim-duration: 1s;
@distance: 20px;

.animated {
-webkit-animation-fill-mode: both;
-moz-animation-fill-mode: both;
-ms-animation-fill-mode: both;
-o-animation-fill-mode: both;
animation-fill-mode: both;
-webkit-animation-duration: @anim-duration;
-moz-animation-duration: @anim-duration;
-ms-animation-duration: @anim-duration;
-o-animation-duration: @anim-duration;
animation-duration: @anim-duration;
}

@-webkit-keyframes fadeInUp {
0% {
opacity: 0;
-webkit-transform: translateY(@distance);
}

100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}

@-moz-keyframes fadeInUp {
0% {
opacity: 0;
-moz-transform: translateY(@distance);
}

100% {
opacity: 1;
-moz-transform: translateY(0);
}
}

@-o-keyframes fadeInUp {
0% {
opacity: 0;
-o-transform: translateY(@distance);
}

100% {
opacity: 1;
-o-transform: translateY(0);
}
}

@keyframes fadeInUp {
0% {
opacity: 0;
transform: translateY(@distance);
}

100% {
opacity: 1;
transform: translateY(0);
}
}

.fade-in-up {
-webkit-animation-name: fadeInUp;
-moz-animation-name: fadeInUp;
-o-animation-name: fadeInUp;
animation-name: fadeInUp;
}

@-webkit-keyframes fadeInDown {
0% {
opacity: 0;
-webkit-transform: translateY(-@distance);
}

100% {
opacity: 1;
-webkit-transform: translateY(0);
}
}

@-moz-keyframes fadeInDown {
0% {
opacity: 0;
-moz-transform: translateY(-@distance);
}

100% {
opacity: 1;
-moz-transform: translateY(0);
}
}

@-o-keyframes fadeInDown {
0% {
opacity: 0;
-ms-transform: translateY(-@distance);
}

100% {
opacity: 1;
-ms-transform: translateY(0);
}
}

@keyframes fadeInDown {
0% {
opacity: 0;
transform: translateY(-@distance);
}

100% {
opacity: 1;
transform: translateY(0);
}
}

.fade-in-down {
-webkit-animation-name: fadeInDown;
-moz-animation-name: fadeInDown;
-o-animation-name: fadeInDown;
animation-name: fadeInDown;
}
@-webkit-keyframes fadeInRight {
0% {
opacity: 0;
-webkit-transform: translateX(-@distance);
}

100% {
opacity: 1;
-webkit-transform: translateX(0);
}
}

@-moz-keyframes fadeInRight {
0% {
opacity: 0;
-moz-transform: translateX(-@distance);
}

100% {
opacity: 1;
-moz-transform: translateX(0);
}
}

@-o-keyframes fadeInRight {
0% {
opacity: 0;
-o-transform: translateX(-@distance);
}

100% {
opacity: 1;
-o-transform: translateX(0);
}
}

@keyframes fadeInRight {
0% {
opacity: 0;
transform: translateX(-@distance);
}

100% {
opacity: 1;
transform: translateX(0);
}
}

.fade-in-right {
-webkit-animation-name: fadeInRight;
-moz-animation-name: fadeInRight;
-o-animation-name: fadeInRight;
animation-name: fadeInRight;
}
@-webkit-keyframes fadeInLeft {
0% {
opacity: 0;
-webkit-transform: translateX(@distance);
}

100% {
opacity: 1;
-webkit-transform: translateX(0);
}
}

@-moz-keyframes fadeInLeft {
0% {
opacity: 0;
-moz-transform: translateX(@distance);
}

100% {
opacity: 1;
-moz-transform: translateX(0);
}
}

@-o-keyframes fadeInLeft {
0% {
opacity: 0;
-o-transform: translateX(@distance);
}

100% {
opacity: 1;
-o-transform: translateX(0);
}
}

@keyframes fadeInLeft {
0% {
opacity: 0;
transform: translateX(@distance);
}

100% {
opacity: 1;
transform: translateX(0);
}
}

.fade-in-left {
-webkit-animation-name: fadeInLeft;
-moz-animation-name: fadeInLeft;
-o-animation-name: fadeInLeft;
animation-name: fadeInLeft;
}

3 changes: 1 addition & 2 deletions css/hopscotch.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import "util.less";
@import "bounce.less";
@import "flipin.less";
@import "fade.less";

@anim-duration: .5s;
@bubbleCornerRadius: 10px;
Expand Down
Loading

0 comments on commit db7c2bb

Please sign in to comment.