index.vue 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <div class="nums">
  3. <div class="n-top "><span>{{data.sum}}</span></div>
  4. <div class="n-bottom">{{data.name}}</div>
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. props: ['data']
  10. }
  11. </script>
  12. <style scoped>
  13. .nums{
  14. height: 90%;
  15. text-align: center;
  16. display: flex;
  17. flex-direction: column;
  18. justify-content: space-between;
  19. margin-top: 1%;
  20. }
  21. .n-top{
  22. width: 100px;
  23. height: 100px;
  24. border-radius: 50%;
  25. background-color: #DDCC92;
  26. color: #b8741a;
  27. /* background-color: rgba(255, 255, 255, 0.05); */
  28. position: relative;
  29. }
  30. .n-top::before{
  31. content: '';
  32. border-radius: 50%;
  33. background: none;
  34. border: 2px solid rgba(167, 161, 95, 0.15);
  35. width: 120px;
  36. height: 120px;
  37. position: absolute;
  38. top: 50%;
  39. left: 50%;
  40. transform: translate(-50%,-50%);
  41. }
  42. span{
  43. position: absolute;
  44. top: 50%;
  45. left: 50%;
  46. transform: translate(-50%,-50%);
  47. font-size: 22px;
  48. font-weight: bold;
  49. }
  50. .n-bottom{
  51. margin-top: 20px;
  52. }
  53. </style>