分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 技术分享

使用 css 的 keyframe 实现 loading 动画

发布时间:2023-09-06 01:46责任编辑:苏小强关键词:动画
<!DOCTYPE html><html lang="en"><head> ???<meta charset="UTF-8"> ???<title>css animation</title> ?<style> ???body { ?????background-color: gray; ???} ???@-moz-keyframes spin { 100% { -moz-transform: rotate(360deg); } } ???@-webkit-keyframes spin { 100% { -webkit-transform: ?rotate(360deg); } } ???@keyframes spin { 100% { -webkit-transform: ?rotate(360deg); transform: rotate(360deg); } } ???.preloader { ?????animation-name: spin; ?????animation-duration: .5s; ?????animation-timing-function: linear; ?????-webkit-animation-delay: 0s; ?????animation-animation-delay: 0s; ?????animation-iteration-count: infinite; ?????animation-direction: normal; ?????animation-fill-mode: none; ?????animation-play-state: running; ?????border: 2px solid transparent; ?????border-top: 2px solid #fff; ?????border-left: 2px solid #fff; ?????border-radius: 50px; ?????opacity: 1; ?????width: 32px; ?????height: 32px; ?????cursor: wait; ?????display: block; ?????transition: all 400ms ease !important; ?????-webkit-animation: spin .6s linear infinite; ?????-o-animation: spin .6s linear infinite; ?????animation: spin .6s linear infinite; ???} ???#animation { ???} ?</style></head><body><div id="animation" class="preloader"></div></body></html>

  

使用 css 的 keyframe 实现 loading 动画

原文地址:https://www.cnblogs.com/eleven24/p/8648839.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved