scale-out.vue 778 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <view>
  3. <view
  4. :style="{
  5. backgroundColor: color,
  6. width: size + 40 + 'px',
  7. height: size + 40 + 'px'
  8. }"
  9. class="spinner-inside"
  10. ></view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. name: 'scaleOut',
  16. props: {
  17. color: String,
  18. size: Number
  19. }
  20. };
  21. </script>
  22. <style scoped>
  23. .spinner-inside {
  24. margin: 25px auto;
  25. border-radius: 100%;
  26. -webkit-animation: scaleout 1s infinite ease-in-out;
  27. animation: scaleout 1s infinite ease-in-out;
  28. }
  29. @-webkit-keyframes scaleout {
  30. 0% {
  31. -webkit-transform: scale(0);
  32. }
  33. 100% {
  34. -webkit-transform: scale(1);
  35. opacity: 0;
  36. }
  37. }
  38. @keyframes scaleout {
  39. 0% {
  40. transform: scale(0);
  41. -webkit-transform: scale(0);
  42. }
  43. 100% {
  44. transform: scale(1);
  45. -webkit-transform: scale(1);
  46. opacity: 0;
  47. }
  48. }
  49. </style>