温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

css怎么制作超萌吃豆豆加载动画效果

发布时间:2022-04-28 15:41:55 阅读:137 作者:iii 栏目:大数据
前端开发者测试专用服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

这篇文章主要介绍“css怎么制作超萌吃豆豆加载动画效果”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“css怎么制作超萌吃豆豆加载动画效果”文章能帮助大家解决问题。

豆豆加载效果

css怎么制作超萌吃豆豆加载动画效果 

point_down:html代码:

<div class="demo">
 <div class="pacman"></div>
<div class="dot"></div>

point_down:css代码:

<style>
@-webkit-keyframes up {
  0%100% {    transformrotate(0);
  }
  50% {
    transformrotate(-30deg);
  }
}
@-moz-keyframes up {
  0%100% {
    transformrotate(0);
  }
  50% {
    transformrotate(-30deg);
  }
}
@-o-keyframes up {
  0%100% {
    transformrotate(0);
  }
  50% {
    transformrotate(-30deg);
  }
}
@keyframes up {
  0%100% {
    transformrotate(0);
  }
  50% {
    transformrotate(-30deg);
  }
}
@-webkit-keyframes down {
  0%100% {
    transformrotate(0);
  }
  50% {
    transformrotate(30deg);
  }
}
@-moz-keyframes down {
  0%100% {
    transformrotate(0);
  }
  50% {
    transformrotate(30deg);
  }
}
@-o-keyframes down {
  0%100% {
    transformrotate(0);
  }
  50% {
    transformrotate(30deg);
  }
}
@keyframes down {
  0%100% {
    transformrotate(0);
  }
  50% {
    transformrotate(30deg);
  }
}
@-webkit-keyframes r-to-l {
  100% {
    margin-left: -1px;
  }
}
@-moz-keyframes r-to-l {
  100% {
    margin-left: -1px;
  }
}
@-o-keyframes r-to-l {
  100% {
    margin-left: -1px;
  }
}
@keyframes r-to-l {
  100% {
    margin-left: -1px;
  }
}
body {
  background#000;
  overflow: hidden;
  margin0;
}
body .pacman:beforebody .pacman:after {
  content'';
  position: absolute;
  background#FFC107;
  width100px;
  height50px;
  left50%;
  top50%;
  margin-left: -50px;
  margin-top: -50px;
  border-radius50px 50px 0 0;
  -webkit-animation: up 0.4s infinite;
  -moz-animation: up 0.4s infinite;
  -o-animation: up 0.4s infinite;
  animation: up 0.4s infinite;
}
body .pacman:after {
  margin-top: -1px;
  border-radius0 0 50px 50px;
  -webkit-animation: down 0.4s infinite;
  -moz-animation: down 0.4s infinite;
  -o-animation: down 0.4s infinite;
  animation: down 0.4s infinite;
}
body .dot {
  position: absolute;
  left50%;
  top50%;
  width10px;
  height10px;
  margin-top: -5px;
  margin-left30px;
  border-radius50%;
  background#ccc;
  z-index: -1;
  box-shadow30px 0 0 #ccc60px 0 0 #ccc90px 0 0 #ccc120px 0 0 #ccc150px 0 0 #ccc;
  -webkit-animation: r-to-l 0.4s infinite;
  -moz-animation: r-to-l 0.4s infinite;
  -o-animation: r-to-l 0.4s infinite;
  animation: r-to-l 0.4s infinite;
}
  </style>

关于“css怎么制作超萌吃豆豆加载动画效果”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识,可以关注亿速云行业资讯频道,小编每天都会为大家更新不同的知识点。

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

原文链接:https://my.oschina.net/u/2446442/blog/4379897

css
AI

开发者交流群×