index.vue 479 B

1234567891011121314151617181920212223242526
  1. <template>
  2. <transition name="fade">
  3. <div class="toast" v-show="show">{{text}}</div>
  4. </transition>
  5. </template>
  6. <style lang="scss" scoped>
  7. .toast{
  8. position: fixed;
  9. z-index: 999;
  10. left: 50%;
  11. top: 50%;
  12. transform: translate(-50%, -50%);
  13. font-size: 14px;
  14. height: 44px;
  15. line-height: 44px;
  16. color: #ffffff;
  17. background-color: rgba($color: #000000, $alpha: .7);
  18. padding: 0 52px;
  19. display: table;
  20. }
  21. .h5-wrap{
  22. .toast{
  23. padding: 0 px2rem(40);
  24. }
  25. }
  26. </style>