Commit dca1ed65 by doszhang

dos

parent ce5643a5
...@@ -156,6 +156,16 @@ input::-webkit-input-placeholder { ...@@ -156,6 +156,16 @@ input::-webkit-input-placeholder {
-webkit-animation: fadeOutLeft 1s ease-in forwards; -webkit-animation: fadeOutLeft 1s ease-in forwards;
} }
.fadeinleft {
animation: fadeInLeft 0.5s ease-in forwards;
-webkit-animation: fadeInLeft 0.5s ease-in forwards;
}
.fadeoutright {
animation: fadeOutRight 0.5s ease-in forwards;
-webkit-animation: fadeOutRight 0.5s ease-in forwards;
}
.btn-nextquestion:active { .btn-nextquestion:active {
background: url(../image2/question-btn-next.png) top left no-repeat; background: url(../image2/question-btn-next.png) top left no-repeat;
background-size: 100%; background-size: 100%;
...@@ -175,6 +185,34 @@ canvas { ...@@ -175,6 +185,34 @@ canvas {
-webkit-animation: fadeInUp 0.7s ease-out backwards; -webkit-animation: fadeInUp 0.7s ease-out backwards;
} }
@-webkit-keyframes fadeInLeft {
0% {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0)
}
to {
opacity: 1;
-webkit-transform: none;
transform: none
}
}
@keyframes fadeInLeft {
0% {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0)
}
to {
opacity: 1;
-webkit-transform: none;
transform: none
}
}
@-webkit-keyframes fadeInUp { @-webkit-keyframes fadeInUp {
0% { 0% {
opacity: 0; opacity: 0;
...@@ -203,6 +241,30 @@ canvas { ...@@ -203,6 +241,30 @@ canvas {
} }
} }
@-webkit-keyframes fadeOutRight {
0% {
opacity: 1
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0)
}
}
@keyframes fadeOutRight {
0% {
opacity: 1
}
to {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0)
}
}
@-webkit-keyframes fadeOutLeft { @-webkit-keyframes fadeOutLeft {
0% { 0% {
opacity: 1 opacity: 1
...@@ -227,6 +289,34 @@ canvas { ...@@ -227,6 +289,34 @@ canvas {
} }
} }
@-webkit-keyframes fadeInRight {
0% {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0)
}
to {
opacity: 1;
-webkit-transform: none;
transform: none
}
}
@keyframes fadeInRight {
0% {
opacity: 0;
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0)
}
to {
opacity: 1;
-webkit-transform: none;
transform: none
}
}
/* poster-page */ /* poster-page */
.posterImg { .posterImg {
z-index: 1; z-index: 1;
......
...@@ -390,9 +390,9 @@ function submitAnswer() { ...@@ -390,9 +390,9 @@ function submitAnswer() {
function prevQuestion() { function prevQuestion() {
if (nowQuestionIndex != 1) { if (nowQuestionIndex != 1) {
let nowIndex = nowQuestionIndex; let nowIndex = nowQuestionIndex;
$('.question' + nowQuestionIndex + '-block').addClass('fadeoutleft'); $('.question' + nowQuestionIndex + '-block').addClass('fadeoutright');
setTimeout(function () { setTimeout(function () {
$('.question' + nowIndex + '-block').removeClass('fadeoutleft').hide(); $('.question' + nowIndex + '-block').removeClass('fadeoutright').hide();
}, 1000); }, 1000);
$('.btn-submit').hide(); $('.btn-submit').hide();
$('.btn-nextquestion').show(); $('.btn-nextquestion').show();
...@@ -402,7 +402,7 @@ function prevQuestion() { ...@@ -402,7 +402,7 @@ function prevQuestion() {
'left': '' + 5.5 * (nowQuestionIndex - 1) + 'rem' 'left': '' + 5.5 * (nowQuestionIndex - 1) + 'rem'
}, 500); }, 500);
setTimeout(function () { setTimeout(function () {
$('.question' + nowQuestionIndex + '-block').show(); $('.question' + nowQuestionIndex + '-block').addClass('fadeinleft').show();
}, 900); }, 900);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment