Css3梳理篇——animation(动画)

1、 animation

name --动画名

duration --设置动画所需时间(先)

timing-function --动画类型(线性 linear)

delay --延迟时间(后)

iteration-count --动画的播放次数(无限循环 infinite / n --n次)

direction --方向(正向/反向reverse)

fill-mode; --动画之外的状态(forwards)


2、animation-play-state(一般单独使用)

动画的播放状态(播放/暂停)

播放--running

暂停--paused


3、代码

css 复制代码
.earth-con {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    border-radius: 50%;
    z-index: 2;
    /* TODO:待补充代码,添加动画 */
    /* 复合属性 */
    animation: orbit 36.5s linear infinite;
    /* 单独只用 */
    animation-play-state: running;
    animation-play-state: paused;
    
}
相关推荐
多则惑少则明11 小时前
Vue开发系列——自定义组件开发
前端·javascript·vue.js
用户2506949216111 小时前
next框架打包.next文件夹部署
前端
程序猿小蒜11 小时前
基于springboot的校园社团信息管理系统开发与设计
java·前端·spring boot·后端·spring
一叶难遮天11 小时前
开启RN之旅——前端基础
前端·javascript·promise·js基础·es6/ts·npm/nrm
申阳11 小时前
Day 4:02. 基于Nuxt开发博客项目-整合 Inspira UI
前端·后端·程序员
程序猿_极客11 小时前
【期末网页设计作业】HTML+CSS+JavaScript 猫咪主题网站开发(附源码与效果演示)
前端·css·html·课程设计·网页设计作业
IT古董11 小时前
【前端】从零开始搭建现代前端框架:React 19、Vite、Tailwind CSS、ShadCN UI 完整实战教程-第1章:项目概述与技术栈介绍
前端·react.js·前端框架
有点笨的蛋11 小时前
从零搭建小程序首页:新手也能看懂的结构解析与实战指南
前端·微信小程序
爱宇阳11 小时前
Vue3 前端项目 Docker 容器化部署教程
前端·docker·容器
Irene199111 小时前
前端缓存技术和使用场景
前端·缓存