当前位置:   article > 正文

css 浮动动画效果_css浮动动画

css浮动动画

 箭头从上向下浮动

  1. <div class="top">
  2. <img src="img/1x/hyyy-ban.jpg" alt="" class="w100">
  3. <div class="container ">
  4. <div class="title">技术支持</div>
  5. <div class="icon">
  6. <i class="iconfont icon-xiajiantou"></i>
  7. </div>
  8. </div>
  9. </div>

 css代码

  1. .top{
  2. .container {
  3. position: absolute;
  4. top: 25%;
  5. left: 0;
  6. .icon{
  7. width: 3.3125rem;
  8. height: 3.3125rem;
  9. line-height: 3.3125rem;
  10. .bgc;
  11. border-radius: 50%;
  12. text-align: center;
  13. overflow: hidden;
  14. .icon-xiajiantou{
  15. font-size: 1.375rem;
  16. .cb;
  17. display: inline-block;
  18. animation: xiagun 4s linear infinite;
  19. }
  20. @keyframes xiagun {
  21. 0% {
  22. transform: translateY(-1.5rem);
  23. }
  24. 100% {
  25. transform: translateY(2.5rem);
  26. }
  27. }
  28. }
  29. }
  30. }

 实现效果

地图上定位图标上下浮动 

html代码

  1. <div class="mt60 ta pr">
  2. <img src="https://cloud-assets-brwq.oss-cn-heyuan.aliyuncs.com/kunpeng0808/uploads/20220818/a7f393dcceaad2db00792b002fb07a12.svg"
  3. alt="" />
  4. <!-- <div class="hover">以北京、上海、广州、成都、武汉、西<br>安、济南、杭州个城市为核心点覆盖全国</div> -->
  5. <div class="hover">
  6. <div class="dian dian1">
  7. <div>北京</div>
  8. <p>
  9. <i class="iconfont icon-daohangdizhi"></i>
  10. </p>
  11. </div>
  12. <div class="dian dian2">
  13. <div>济南</div>
  14. <p>
  15. <i class="iconfont icon-daohangdizhi"></i>
  16. </p>
  17. </div>
  18. <div class="dian dian3">
  19. <div>上海</div>
  20. <p>
  21. <i class="iconfont icon-daohangdizhi"></i>
  22. </p>
  23. </div>
  24. <div class="dian dian4">
  25. <div>杭州</div>
  26. <p>
  27. <i class="iconfont icon-daohangdizhi"></i>
  28. </p>
  29. </div>
  30. <div class="dian dian5">
  31. <div>西安</div>
  32. <p>
  33. <i class="iconfont icon-daohangdizhi"></i>
  34. </p>
  35. </div>
  36. <div class="dian dian6">
  37. <div>武汉</div>
  38. <p>
  39. <i class="iconfont icon-daohangdizhi"></i>
  40. </p>
  41. </div>
  42. <div class="dian dian7">
  43. <div>广州</div>
  44. <p>
  45. <i class="iconfont icon-daohangdizhi"></i>
  46. </p>
  47. </div>
  48. <div class="dian dian8">
  49. <div>成都</div>
  50. <p>
  51. <i class="iconfont icon-daohangdizhi"></i>
  52. </p>
  53. </div>
  54. </div>
  55. </div>

 css代码 

  1. .list_service_two .pr{
  2. positon: relative;
  3. }
  4. .list_service_two .hover {
  5. position: absolute;
  6. top: 50%;
  7. right: 0;
  8. transform: translateY(-50%);
  9. font-size: 1.25rem;
  10. line-height: 1.125rem;
  11. text-align: justify;
  12. width: 100%;
  13. height: 100%;
  14. color: #FFFFFF;
  15. }
  16. .list_service_two .hover .dian{
  17. position: absolute;
  18. text-align: center;
  19. font-size: .875rem;
  20. }
  21. .list_service_two .hover .dian .iconfont{
  22. color: #80BF2E;
  23. font-size: .875rem;
  24. display: inline-block;
  25. animation: xiagun 1s linear infinite alternate;
  26. }
  27. @keyframes xiagun {
  28. 0% {
  29. transform: translateY(-2px);
  30. }
  31. 100% {
  32. transform: translateY(0);
  33. }
  34. }

 

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/548494
推荐阅读
相关标签
  

闽ICP备14008679号