首页 前端知识 Css3梳理篇——animation(动画)

Css3梳理篇——animation(动画)

2024-09-12 23:09:20 前端知识 前端哥 763 696 我要收藏

   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、代码

.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;
}
复制

转载请注明出处或者链接地址:https://www.qianduange.cn//article/18149.html
标签
评论
还可以输入200
共0条数据,当前/页
发布的文章

安装Nodejs后,npm无法使用

2024-11-30 11:11:38

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!