stackBorder.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <div class="border-box">
  3. <div class="top"></div>
  4. <div class="right"></div>
  5. <div class="bottom"></div>
  6. <div class="left"></div>
  7. <div class="center">
  8. <slot></slot>
  9. </div>
  10. </div>
  11. </template>
  12. <script lang="ts" setup></script>
  13. <style lang="scss" scoped>
  14. .border-box {
  15. width: 95px;
  16. height: 95px;
  17. position: relative;
  18. padding: 4px;
  19. }
  20. .top {
  21. position: absolute;
  22. top: 0;
  23. left: 4px;
  24. width: 87px;
  25. height: 1px;
  26. background-color: #7dc8ea;
  27. }
  28. .right {
  29. position: absolute;
  30. top: 4px;
  31. right: 0;
  32. width: 1px;
  33. height: 87px;
  34. background-color: #7dc8ea;
  35. }
  36. .bottom {
  37. position: absolute;
  38. bottom: 0;
  39. left: 4px;
  40. width: 87px;
  41. height: 1px;
  42. background-color: #7dc8ea;
  43. }
  44. .left {
  45. position: absolute;
  46. top: 4px;
  47. left: 0;
  48. width: 1px;
  49. height: 87px;
  50. background-color: #7dc8ea;
  51. }
  52. .center {
  53. position: absolute;
  54. top: 4px;
  55. left: 4px;
  56. width: 87px;
  57. height: 87px;
  58. border: 1px solid #7dc8ea;
  59. display: flex;
  60. justify-content: center;
  61. align-items: center;
  62. font-weight: 500;
  63. font-size: 38px;
  64. color: rgba(0, 0, 0, 0.9);
  65. }
  66. </style>