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

Css3梳理篇——animation(动画)

2024-09-12 23:09:20 前端知识 前端哥 752 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
标签
评论
发布的文章

关于HTML的知识

2024-09-18 23:09:36

js简单实现轮播图效果

2024-09-18 23:09:36

CSS3美化网页元素

2024-09-18 23:09:27

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