scale-out.vue 858 B

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