CSS animation 动画执行结束保留结束状态

作者 : 开心源码 本文共416个字,预计阅读时间需要2分钟 发布时间: 2022-05-13 共258人阅读

实例:一个箭头默认向下,点击开展之后箭头向上

animation.gif

animation: rotate .25s linear 1 alternate forwards;

意思为 name、时间、动画的速度曲线、动画执行次数、如何循环、动画之前或者之后的效果

    /* 显示的时候动画效果 */    .animation {        animation: rotate .25s linear 1 alternate forwards;    } /*隐藏时候动画效果 */    .animation1 {        animation: rotate1 .25s linear 1 alternate forwards;    }    @keyframes rotate {        0% {            transform: rotate(0deg);        }        100% {            transform: rotate(180deg);        }    }    @keyframes rotate1 {        0% {            transform: rotate(180deg);                    }        100% {            transform: rotate(0deg);        }    }
说明
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是摆设,本站源码仅提供给会员学习使用!
7. 如遇到加密压缩包,请使用360解压,如遇到无法解压的请联系管理员
开心源码网 » CSS animation 动画执行结束保留结束状态

发表回复