|
|
@@ -8,9 +8,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<ul class="content clearfix list-unstyled">
|
|
|
- <li v-for="(data, index) in featureData" @click="openUrl('/')" :class="{'move': hasAnimation }"
|
|
|
- @mouseenter="hasAnimation = false"
|
|
|
- @mouseleave="hasAnimation = true">
|
|
|
+ <li v-for="(data, index) in featureData" :class="{'moveTop': isTop, 'moveBottom': !isTop}"
|
|
|
+ @mouseenter="changeInterval(false)"
|
|
|
+ @mouseleave="changeInterval(true)">
|
|
|
<div>
|
|
|
<p>{{data.illustrationF}}</p>
|
|
|
<p class="illustration">{{data.illustrationS}}</p>
|
|
|
@@ -45,16 +45,41 @@
|
|
|
illustrationF: '平台用户的链式',
|
|
|
illustrationS: '反应式发展'
|
|
|
}],
|
|
|
- hasAnimation: true
|
|
|
+ hasAnimation: true,
|
|
|
+ timerIndex: 0,
|
|
|
+ isTop: false, // 判断是否滚动至顶,
|
|
|
+ isBottom: true,
|
|
|
+ timer: {} // 定时器实体
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
+ 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 {
|
|
|
+ /*@keyframes featureTop {
|
|
|
0%{top: 0;}
|
|
|
50%{top: 40px;}
|
|
|
100%{top: 0px;}
|
|
|
@@ -93,7 +118,7 @@
|
|
|
0%{top: 40px;}
|
|
|
50%{top: 0px;}
|
|
|
100%{top: 40px;}
|
|
|
- }
|
|
|
+ }*/
|
|
|
.features{
|
|
|
width: 100%;
|
|
|
min-width: 1190px;
|
|
|
@@ -112,7 +137,6 @@
|
|
|
border-bottom:1px solid #ff7070;
|
|
|
p{
|
|
|
margin:0;
|
|
|
- font-family: FZLTXHK;
|
|
|
font-size: 14px;
|
|
|
color: #666;
|
|
|
}
|
|
|
@@ -161,20 +185,32 @@
|
|
|
&:nth-child(2), &:nth-child(4), &:nth-child(6){
|
|
|
div{
|
|
|
top: 40px;
|
|
|
- animation: featureTop 3s linear infinite;
|
|
|
+ /*animation: featureTop 3s linear infinite;
|
|
|
-moz-animation: featureTop 3s linear infinite;
|
|
|
-o-animation: featureTop 3s linear infinite;
|
|
|
- -webkit-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 */
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
&:nth-child(1), &:nth-child(3), &:nth-child(5){
|
|
|
div{
|
|
|
top: 0px;
|
|
|
- animation: featureBottom 3s linear infinite;
|
|
|
+ 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;
|
|
|
-
|
|
|
+ -webkit-animation: featureBottom 3s linear infinite;*/
|
|
|
}
|
|
|
}
|
|
|
div{
|
|
|
@@ -189,6 +225,8 @@
|
|
|
p{
|
|
|
color: #2d84fd;
|
|
|
}
|
|
|
+ animation-play-state:paused;
|
|
|
+ -webkit-animation-play-state:paused; /* Safari 和 Chrome */
|
|
|
}
|
|
|
p {
|
|
|
margin: 0px;
|
|
|
@@ -197,12 +235,12 @@
|
|
|
width: 100%;
|
|
|
color: #fff;
|
|
|
&:last-child{
|
|
|
- font-weight: 600;
|
|
|
+ font-weight: bold;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .hasAnimation{
|
|
|
+ /* .move{
|
|
|
&:nth-child(2), &:nth-child(4), &:nth-child(6){
|
|
|
div{
|
|
|
top: 40px;
|
|
|
@@ -222,7 +260,31 @@
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+ }*/
|
|
|
+ .moveBottom {
|
|
|
+ &:nth-child(2), &:nth-child(4), &:nth-child(6) {
|
|
|
+ div {
|
|
|
+ top: 0px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &:nth-child(1), &:nth-child(3), &:nth-child(5) {
|
|
|
+ div {
|
|
|
+ top: 40px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+ .moveTop{
|
|
|
+ &:nth-child(2), &:nth-child(4), &:nth-child(6){
|
|
|
+ div{
|
|
|
+ top: 40px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ &:nth-child(1), &:nth-child(3), &:nth-child(5){
|
|
|
+ div{
|
|
|
+ top: 0px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|