|
|
@@ -8,9 +8,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<ul class="content clearfix list-unstyled">
|
|
|
- <li v-for="(data, index) in featureData" :class="{'moveTop': isTop, 'moveBottom': !isTop}"
|
|
|
- @mouseenter="changeInterval(false)"
|
|
|
- @mouseleave="changeInterval(true)">
|
|
|
+ <li v-for="(data, index) in featureData" :class="{'moveTop': isTop}"
|
|
|
+ @mouseenter="isTop = true"
|
|
|
+ @mouseleave="isTop = false">
|
|
|
<div>
|
|
|
<p>{{data.illustrationF}}</p>
|
|
|
<p class="illustration">{{data.illustrationS}}</p>
|
|
|
@@ -45,80 +45,79 @@
|
|
|
illustrationF: '平台用户的链式',
|
|
|
illustrationS: '反应式发展'
|
|
|
}],
|
|
|
- hasAnimation: true,
|
|
|
timerIndex: 0,
|
|
|
- isTop: false, // 判断是否滚动至顶,
|
|
|
- isBottom: true,
|
|
|
- timer: {} // 定时器实体
|
|
|
- }
|
|
|
- },
|
|
|
- mounted () {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.changeInterval(true)
|
|
|
- })
|
|
|
- },
|
|
|
- methods: {
|
|
|
- changeInterval: function (flag) {
|
|
|
- if (flag) {
|
|
|
- this.timer = setInterval(() => {
|
|
|
- this.timerIndex ++
|
|
|
- if (this.timerIndex % 2 === 0) {
|
|
|
- this.isTop = true
|
|
|
- this.isBottom = false
|
|
|
- } else {
|
|
|
- this.isTop = false
|
|
|
- this.isBottom = true
|
|
|
- }
|
|
|
- }, 3000)
|
|
|
- } else {
|
|
|
- clearInterval(this.timer)
|
|
|
- }
|
|
|
+ isTop: false
|
|
|
}
|
|
|
}
|
|
|
+// mounted () {
|
|
|
+// this.$nextTick(() => {
|
|
|
+// this.changeInterval(true)
|
|
|
+// })
|
|
|
+// },
|
|
|
+// methods: {
|
|
|
+// changeInterval: function (flag) {
|
|
|
+// if (flag) {
|
|
|
+// this.timer = setInterval(() => {
|
|
|
+// this.timerIndex ++
|
|
|
+// if (this.timerIndex % 2 === 0) {
|
|
|
+// this.isTop = true
|
|
|
+// this.isBottom = false
|
|
|
+// } else {
|
|
|
+// this.isTop = false
|
|
|
+// this.isBottom = true
|
|
|
+// }
|
|
|
+// }, 3000)
|
|
|
+// } else {
|
|
|
+// clearInterval(this.timer)
|
|
|
+// }
|
|
|
+// }
|
|
|
+// }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style type="text/scss" lang="scss" scoped>
|
|
|
- /*@keyframes featureTop {
|
|
|
- 0%{top: 0;}
|
|
|
- 50%{top: 40px;}
|
|
|
- 100%{top: 0px;}
|
|
|
+ @keyframes featureTop {
|
|
|
+ 0%{transform: translate3d(0, 0px, 0);}
|
|
|
+ 50%{transform: translate3d(0, 40px, 0);}
|
|
|
+ 100%{transform: translate3d(0, 0px, 0);}
|
|
|
}
|
|
|
@-webkit-keyframes featureTop {
|
|
|
- 0%{top: 0;}
|
|
|
- 50%{top: 40px;}
|
|
|
- 100%{top: 0px;}
|
|
|
+ 0%{transform: translate3d(0, 0px, 0);}
|
|
|
+ 50%{transform: translate3d(0, 40px, 0);}
|
|
|
+ 100%{transform: translate3d(0, 0px, 0);}
|
|
|
}
|
|
|
@-moz-keyframes featureTop {
|
|
|
- 0%{top: 0;}
|
|
|
- 50%{top: 40px;}
|
|
|
- 100%{top: 0px;}
|
|
|
+ 0%{transform: translate3d(0, 0px, 0);}
|
|
|
+ 50%{transform: translate3d(0, 40px, 0);}
|
|
|
+ 100%{transform: translate3d(0, 0px, 0);}
|
|
|
}
|
|
|
@-o-keyframes featureTop {
|
|
|
- 0%{top: 0;}
|
|
|
- 50%{top: 40px;}
|
|
|
- 100%{top: 0px;}
|
|
|
+ 0%{transform: translate3d(0, 0px, 0);}
|
|
|
+ 50%{transform: translate3d(0, 40px, 0);}
|
|
|
+ 100%{transform: translate3d(0, 0px, 0);}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
@keyframes featureBottom {
|
|
|
- 0%{top: 40px;}
|
|
|
- 50%{top: 0px;}
|
|
|
- 100%{top: 40px;}
|
|
|
+ 0%{transform: translate3d(0, 40px, 0);}
|
|
|
+ 50%{transform: translate3d(0, 0px, 0);}
|
|
|
+ 100%{transform: translate3d(0, 40px, 0);}
|
|
|
}
|
|
|
@-webkit-keyframes featureBottom {
|
|
|
- 0%{top: 40px;}
|
|
|
- 50%{top: 0px;}
|
|
|
- 100%{top: 40px;}
|
|
|
+ 0%{transform: translate3d(0, 40px, 0);}
|
|
|
+ 50%{transform: translate3d(0, 0px, 0);}
|
|
|
+ 100%{transform: translate3d(0, 40px, 0);}
|
|
|
}
|
|
|
@-moz-keyframes featureBottom {
|
|
|
- 0%{top: 40px;}
|
|
|
- 50%{top: 0px;}
|
|
|
- 100%{top: 40px;}
|
|
|
+ 0%{transform: translate3d(0, 40px, 0);}
|
|
|
+ 50%{transform: translate3d(0, 0px, 0);}
|
|
|
+ 100%{transform: translate3d(0, 40px, 0);}
|
|
|
}
|
|
|
@-o-keyframes featureBottom {
|
|
|
- 0%{top: 40px;}
|
|
|
- 50%{top: 0px;}
|
|
|
- 100%{top: 40px;}
|
|
|
- }*/
|
|
|
+ 0%{transform: translate3d(0, 40px, 0);}
|
|
|
+ 50%{transform: translate3d(0, 0px, 0);}
|
|
|
+ 100%{transform: translate3d(0, 40px, 0);}
|
|
|
+ }
|
|
|
.features{
|
|
|
width: 100%;
|
|
|
min-width: 1190px;
|
|
|
@@ -184,33 +183,25 @@
|
|
|
}
|
|
|
&:nth-child(2), &:nth-child(4), &:nth-child(6){
|
|
|
div{
|
|
|
- top: 40px;
|
|
|
- /*animation: featureTop 3s linear infinite;
|
|
|
- -moz-animation: featureTop 3s linear infinite;
|
|
|
- -o-animation: featureTop 3s linear infinite;
|
|
|
- -webkit-animation: featureTop 3s linear infinite;*/
|
|
|
- -webkit-transform-style: preserve-3d;
|
|
|
- -webkit-backface-visibility: hidden;
|
|
|
- transform: translateZ(0);
|
|
|
- transition: top 3s linear;
|
|
|
- -moz-transition: top 3s linear; /* Firefox 4 */
|
|
|
- -webkit-transition: top 3s linear; /* Safari and Chrome */
|
|
|
- -o-transition: top 3s linear; /* Opera */
|
|
|
+ top: 0px;
|
|
|
+ transform: translate3d(0, 40px, 0);
|
|
|
+ animation: featureTop 15s linear infinite;
|
|
|
+ -moz-animation: featureTop 15s linear infinite;
|
|
|
+ -o-animation: featureTop 15s linear infinite;
|
|
|
+ -webkit-animation: featureTop 15s linear infinite;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
&:nth-child(1), &:nth-child(3), &:nth-child(5){
|
|
|
div{
|
|
|
top: 0px;
|
|
|
- transition: top 3s linear;
|
|
|
- -moz-transition: top 3s linear; /* Firefox 4 */
|
|
|
- -webkit-transition: top 3s linear; /* Safari and Chrome */
|
|
|
- -o-transition: top 3s linear; /* Opera */
|
|
|
- transform: translateZ(0);
|
|
|
- /*animation: featureBottom 3s linear infinite;
|
|
|
- -moz-animation: featureBottom 3s linear infinite;
|
|
|
- -o-animation: featureBottom 3s linear infinite;
|
|
|
- -webkit-animation: featureBottom 3s linear infinite;*/
|
|
|
+ transform: translate3d(0, 0px, 0);
|
|
|
+ -webkit-transform-style: preserve-3d;
|
|
|
+ -webkit-backface-visibility: hidden;
|
|
|
+ animation: featureBottom 15s linear infinite;
|
|
|
+ -moz-animation: featureBottom 15s linear infinite;
|
|
|
+ -o-animation: featureBottom 15s linear infinite;
|
|
|
+ -webkit-animation: featureBottom 15s linear infinite;
|
|
|
}
|
|
|
}
|
|
|
div{
|
|
|
@@ -225,8 +216,6 @@
|
|
|
p{
|
|
|
color: #2d84fd;
|
|
|
}
|
|
|
- animation-play-state:paused;
|
|
|
- -webkit-animation-play-state:paused; /* Safari 和 Chrome */
|
|
|
}
|
|
|
p {
|
|
|
margin: 0px;
|
|
|
@@ -240,6 +229,23 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .moveTop {
|
|
|
+ &:nth-child(2), &:nth-child(4), &:nth-child(6) {
|
|
|
+ div {
|
|
|
+ animation-play-state: paused;
|
|
|
+ -webkit-animation-play-state: paused;
|
|
|
+ transform: translateZ(0);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ &:nth-child(1), &:nth-child(3), &:nth-child(5) {
|
|
|
+ div {
|
|
|
+ animation-play-state: paused;
|
|
|
+ -webkit-animation-play-state: paused;
|
|
|
+ transform: translateZ(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
/* .move{
|
|
|
&:nth-child(2), &:nth-child(4), &:nth-child(6){
|
|
|
div{
|
|
|
@@ -261,7 +267,7 @@
|
|
|
}
|
|
|
}
|
|
|
}*/
|
|
|
- .moveBottom {
|
|
|
+ /* .moveBottom {
|
|
|
&:nth-child(2), &:nth-child(4), &:nth-child(6) {
|
|
|
div {
|
|
|
top: 0px;
|
|
|
@@ -284,7 +290,7 @@
|
|
|
top: 0px;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
}
|
|
|
}
|