01.可视化大屏分解动画

在这里插入图片描述

<template>
  <div class="box">
    <div class="image3">
      <div class="ellipse">
        <div class="circle"></div>
      </div>
      <div class="ellipse">
        <div class="circle"></div>
      </div>
      <div class="ellipse">
        <div class="circle"></div>
      </div>
      <div class="center_circle"></div>
    </div>
  </div>
</template>

<style scoped lang="less">
.box {
  position: absolute;
  height: 500px;
  width: 500px;
  top: 0;
  left: 0;
  background-color: aquamarine;

  .image3 {
    position: fixed;
    top: 77px;
    left: 82px;
    height: 300px;
    width: 250px;
    .ellipse {
      width: 288px;
      height: 274px;
      border-radius: 50%;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      margin: auto;
      position: absolute;
      border: 5px rgba(255, 255, 255, 0.8) solid;
      transform-style: preserve-3d; // 开启3D
    }
    .ellipse .circle {
      width: 18px;
      height: 18px;
      border-radius: 50%;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      margin: auto;
      position: absolute;
      background: #fff;
      box-shadow: 0 0 20px 3px #fff;
      animation: move linear infinite; // 动画名字(name) 以相同的速度播放动画(timing-function) 无限循环(iteration-count)
    }
    .ellipse:nth-child(1) {
      transform: rotateZ(103deg) rotateY(68deg); // 旋转
    }
    .ellipse:nth-child(1) .circle {
      animation-duration: 12s;
      width: 12px;
      height: 12px;
    }
    .ellipse:nth-child(2) {
      transform: rotateZ(141deg) rotateY(68deg);
    }
    .ellipse:nth-child(2) .circle {
      animation-duration: 13s;
    }
    .ellipse:nth-child(3) {
      transform: rotateZ(207deg) rotateY(63deg);
    }
    .ellipse:nth-child(3) .circle {
      animation-duration: 14s;
      width: 12px;
      height: 12px;
    }

    .center_circle {
      width: 20px;
      height: 20px;
      border-radius: 50px;
      box-shadow: 0 0 20px 3px #fff;
      background-color: #fff;
      margin: 142px 0 0 133px;
    }
  }
  // @keyframes 关键帧
  @keyframes move {
    from {
      transform: rotateZ(0) translateX(140px) rotateZ(0) rotateY(-80deg);
    }
    to {
      transform: rotateZ(360deg) translateX(140px) rotateZ(-360deg) rotateY(-80deg);
    }
  }
}
</style>

CSS3 animation(动画) 属性
菜鸟教程:https://www.runoob.com/cssref/css3-pr-animation.html
语法:animation : name duration timing-function delay iteration-count direction fill-mode play-state

在这里插入图片描述


CSS3 transform 属性
改属性应用于元素的2D或3D转换。这个属性允许你将元素旋转,缩放,移动,倾斜等
菜鸟教程:https://www.runoob.com/cssref/css3-pr-transform.html

在这里插入图片描述
在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
Vue可视化大屏使用CSS动画来实现一些视觉效果。在Vue项目中,我们可以在组件的样式文件中定义CSS动画。根据提供的引用内容,你可以在`Header.vue`组件、`right/index.vue`组件和`left/index.vue`组件中找到与CSS动画相关的代码。 在`Header.vue`组件中,通过定义名为`fade`的关键帧动画来实现简单的淡入效果。这个动画会在3秒内使组件的不透明度从0变为1。可以在样式类`.es-screen-header`中找到对应的动画定义。 在`right/index.vue`组件和`left/index.vue`组件中,通过定义名为`slide`的关键帧动画来实现左侧和右侧元素的滑动效果。这个动画会在指定的时间内将元素从一侧滑动到另一侧。可以在样式类`.es-screen-right-item`和`.es-screen-left-item`中找到对应的动画定义。 在`right/index.vue`组件中,`.es-screen-right-item`的子元素会按照不同的`nth-child`选择器进行动画设置,每个子元素的动画持续时间不同。 在`left/index.vue`组件中,`.es-screen-left-item`的子元素也会按照不同的`nth-child`选择器进行动画设置,每个子元素的动画持续时间不同。 综上所述,在Vue可视化大屏中,通过定义关键帧动画来实现各种CSS动画效果,包括淡入和滑动效果。这些动画效果可以通过在组件的样式文件中设置相应的动画属性来实现。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* *3* [高效开发大屏可视化项目第二弹:入场动画和无缝滚动](https://blog.csdn.net/weixin_43960320/article/details/132140303)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

*neverGiveUp*

你的鼓励是我最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值