box.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <template lang="">
  2. <div class="box">
  3. <div class="box-header">
  4. <div class="box-header-content">
  5. <slot name="title"></slot>
  6. </div>
  7. </div>
  8. <div class="box-main">
  9. <slot></slot>
  10. </div>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. name: 'ActivityInviteUserBox',
  16. };
  17. </script>
  18. <style lang="scss">
  19. .box {
  20. width: 373px;
  21. box-sizing: border-box;
  22. margin: auto;
  23. // border-image-width: 200px;
  24. // border-image-slice: 200%;
  25. // border-width: 1px;
  26. position: relative;
  27. z-index: 0;
  28. + .box {
  29. margin-top: 30px;
  30. }
  31. .box-header {
  32. // position: absolute;
  33. position: relative;
  34. // top: -30px;
  35. z-index: 1;
  36. // left: 141px;
  37. // left: 0;
  38. // right: 0;
  39. margin-bottom: -34px;
  40. // text-align: center;
  41. // padding: 0 130px;
  42. display: flex;
  43. align-items: center;
  44. justify-content: center;
  45. flex-direction: column;
  46. .box-header-content {
  47. color: #fff;
  48. border-image-source: url('~/assets/image/activity/invite-user/box-title@2x.png');
  49. border-image-slice: 0 140 fill;
  50. border-width: 0 70px 0;
  51. border-style: solid;
  52. height: 38px;
  53. display: flex;
  54. align-items: center;
  55. justify-content: center;
  56. flex-direction: column;
  57. // width: auto;
  58. }
  59. }
  60. .box-main {
  61. z-index: 0;
  62. // padding: 30px 15px 20px;
  63. border-image-source: url('~/assets/image/activity/invite-user/box-bg@2x.png');
  64. border-image-slice: 50 60 80 fill;
  65. border-image-width: 30px 30px 40px;
  66. border-width: 50px 20px 40px;
  67. border-style: solid;
  68. // padding-top: 30px;
  69. }
  70. }
  71. </style>