tips.wxss 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*顶部消息提醒 start*/
  2. .tui-toptips {
  3. width: 100%;
  4. padding: 18rpx 30rpx;
  5. box-sizing: border-box;
  6. position: fixed;
  7. z-index: 9999;
  8. color: #fff;
  9. font-size: 30rpx;
  10. left: 0;
  11. top: 0;
  12. display: flex;
  13. align-items: center;
  14. justify-content: center;
  15. word-break: break-all;
  16. opacity: 0;
  17. transform: translateZ(0) translateY(-100%);
  18. transition: all 0.3s ease-in-out;
  19. }
  20. .tui-top-show {
  21. transform: translateZ(0) translateY(0);
  22. opacity: 1;
  23. }
  24. /*顶部消息提醒 end*/
  25. /*toast消息提醒 start*/
  26. /*注意问题:
  27. 1、fixed 元素宽度无法自适应,所以增加了子元素
  28. 2、fixed 和 display冲突导致动画效果消失,暂时使用visibility替代
  29. */
  30. .tui-toast{
  31. width: 80%;
  32. box-sizing: border-box;
  33. color: #fff;
  34. font-size: 28rpx;
  35. position: fixed;
  36. visibility: hidden;
  37. opacity: 0;
  38. left: 50%;
  39. transition: all 0.3s ease-in-out;
  40. z-index: 9999;
  41. display: flex;
  42. align-items: center;
  43. justify-content: center;
  44. }
  45. .tui-toast-show {
  46. visibility: visible;
  47. opacity: 1;
  48. }
  49. .tui-tips-content{
  50. word-wrap: break-word;
  51. word-break: break-all;
  52. border-radius: 8rpx;
  53. padding: 18rpx 30rpx;
  54. }
  55. /*底部消息提醒 start*/
  56. .tui-bottomtips {
  57. bottom: 120rpx;
  58. -webkit-transform: translateX(-50%);
  59. transform: translateX(-50%);
  60. }
  61. /*底部消息提醒 end*/
  62. /*居中消息提醒 start*/
  63. .tui-centertips{
  64. top: 50%;
  65. -webkit-transform: translate(-50%,-50%);
  66. transform: translate(-50%,-50%);
  67. }
  68. /*居中消息提醒 end*/
  69. /*toast消息提醒 end*/
  70. /*背景颜色 start*/
  71. .tui-primary {
  72. background: #5677fc;
  73. }
  74. .tui-green {
  75. background: #19be6b;
  76. }
  77. .tui-warning {
  78. background: #ff7900;
  79. }
  80. .tui-danger {
  81. background: #ed3f14;
  82. }
  83. .tui-translucent {
  84. background: rgba(0, 0, 0, 0.7);
  85. }
  86. /*背景颜色 end*/
  87. /*消息提醒 end*/