美文网首页
动画(二)

动画(二)

作者: Wrestle_Mania | 来源:发表于2019-11-15 11:59 被阅读0次
<template lang="html">
  <div class="waveWrapper waveAnimation">
    <div class="waveWrapperInner bgTop">
      <div class="wave waveTop"></div>
    </div>
    <div class="waveWrapperInner bgMiddle">
      <div class="wave waveMiddle"></div>
    </div>
    <div class="waveWrapperInner bgBottom">
      <div class="wave waveBottom"></div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  computed: {},
  created() {},
  mounted() {},
  methods: {},
  watch: {},
  components: {}
};
</script>

<style lang="scss" scoped>
@keyframes move_wave {
  0% {
    transform: translateX(0) translateZ(0) scaleY(1);
  }
  50% {
    transform: translateX(-25%) translateZ(0) scaleY(0.55);
  }
  100% {
    transform: translateX(-50%) translateZ(0) scaleY(1);
  }
}
.waveWrapper {
  overflow: hidden;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  margin: auto;
}
.waveWrapperInner {
  position: absolute;
  width: 100%;
  overflow: hidden;
  height: 100%;
  bottom: -1px;
  background-image: linear-gradient(to top, #86377b 20%, #27273c 80%);
}
.bgTop {
  z-index: 15;
  opacity: 0.5;
}
.bgMiddle {
  z-index: 10;
  opacity: 0.75;
}
.bgBottom {
  z-index: 5;
}
.wave {
  position: absolute;
  left: 0;
  width: 200%;
  height: 100%;
  background-repeat: repeat no-repeat;
  background-position: 0 bottom;
  transform-origin: center bottom;
}
.waveTop {
  background-size: 50% 100px;
  background-image: url("./../assets/images/wave-top.png");
}
.waveAnimation .waveTop {
  animation: move-wave 3s;
  -webkit-animation: move-wave 3s;
  -webkit-animation-delay: 1s;
  animation-delay: 1s;
}
.waveMiddle {
  background-size: 50% 120px;
  background-image: url("./../assets/images/wave-mid.png");
}
.waveAnimation .waveMiddle {
  animation: move_wave 10s linear infinite;
}
.waveBottom {
  background-size: 50% 100px;
  background-image: url("./../assets/images/wave-bot.png");
}
.waveAnimation .waveBottom {
  animation: move_wave 15s linear infinite;
}
</style>

这个动画我是写不出来,只能勉强看懂(能写出这个东西的人,脑回路是咋样子的),但是还是有很多学习的东西

  • background-image: linear-gradient(to top, #86377b 20%, #27273c 80%);,这是整个背景的渐变
  • background-repeat: repeat no-repeat; background-position: 0 bottom;这是背景图的设置,第一次见这种写法

相关文章

  • iOS动画专题·UIView二维形变动画与CAAnimation

    iOS动画专题·UIView二维形变动画与CAAnimation核心动画 iOS动画专题·UIView二维形变动画...

  • 在山西太原,做个二维动画需要哪些制作流程?

    二维动画有哪些类型? flash动画,课件动画,mg动画,ae动画,GIF动画,手绘动画,网页动画,企业动画,宣传...

  • 基础动画与关键帧动画

    UIView基础动画一 UIView基础动画二 关键帧动画

  • android developers系列二(动画)

    android developers系列二(动画) 这里先讲一下动画的类型 帧动画 属性动画 补间动画 下面有详细...

  • 专业上海flash动画制作公司

    专业flash动画制作分为二维动画与三维动画技能,像网页上盛行的flash动画就归于二维动画;最有魅力并运用最广的...

  • iOS - UIView的动画

    一、位置动画 二、透明度、颜色动画 三、缩放动画 CGAffineTransformMakeScale(CGFlo...

  • 动画二

    隔了好多天,因为在忙别的事。。。那我们现在要做什么,上一篇讲到一个滚动大屏图,巨丑。趁着回忆的时间,先添两行代码 ...

  • 动画(二)

    这期动画是对基础动画的一个小结。动画的基本属性请看:iOS动画一 说到总结基础动画再总结下属性吧。想要的动画的动画...

  • 动画(二)

    这个动画我是写不出来,只能勉强看懂(能写出这个东西的人,脑回路是咋样子的),但是还是有很多学习的东西 backgr...

  • iOS 动画(二)

    iOS 动画(一)iOS 动画(二) CAEmitterCell CAGradientLayer CAGradie...

网友评论

      本文标题:动画(二)

      本文链接:https://www.haomeiwen.com/subject/vogjictx.html