index.less 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /* ==================
  2. 模态窗口
  3. ==================== */
  4. @import '../../themes/default.less';
  5. @modalPrefixCls: lz-modal;
  6. .@{modalPrefixCls} {
  7. position: fixed;
  8. top: 0;
  9. right: 0;
  10. bottom: 0;
  11. left: 0;
  12. z-index: @modal-zindex;
  13. opacity: 0;
  14. outline: 0;
  15. text-align: center;
  16. -ms-transform: scale(1.185);
  17. transform: scale(1.185);
  18. backface-visibility: hidden;
  19. perspective: 2000upx;
  20. background: @fill-mask;
  21. transition: all 0.3s ease-in-out 0s;
  22. pointer-events: none;
  23. &::before {
  24. content: '\200B';
  25. display: inline-block;
  26. height: 100%;
  27. vertical-align: middle;
  28. }
  29. &&-show {
  30. opacity: 1;
  31. transition-duration: 0.3s;
  32. -ms-transform: scale(1);
  33. transform: scale(1);
  34. overflow-x: hidden;
  35. overflow-y: auto;
  36. pointer-events: auto;
  37. }
  38. .@{modalPrefixCls}-dialog {
  39. position: relative;
  40. display: inline-block;
  41. vertical-align: middle;
  42. margin-left: auto;
  43. margin-right: auto;
  44. width: 680upx;
  45. max-width: 100%;
  46. background-color: @modal-fill;
  47. border-radius: @modal-radius;
  48. overflow: hidden;
  49. }
  50. &&-bottom {
  51. margin-bottom: -1000px;
  52. &::before {
  53. vertical-align: bottom;
  54. }
  55. .@{modalPrefixCls}-dialog {
  56. width: 100%;
  57. border-radius: 0;
  58. }
  59. }
  60. &&-bottom&-show {
  61. margin-bottom: 0;
  62. }
  63. &&-drawer {
  64. transform: scale(1);
  65. display: flex;
  66. .@{modalPrefixCls}-dialog {
  67. height: 100%;
  68. min-width: 200upx;
  69. border-radius: 0;
  70. margin: initial;
  71. transition-duration: 0.3s;
  72. flex-basis: 60%;
  73. }
  74. }
  75. &&-drawer&-left {
  76. justify-content: flex-start;
  77. .@{modalPrefixCls}-dialog {
  78. transform: translateX(-100%);
  79. }
  80. }
  81. &&-drawer&-right {
  82. justify-content: flex-end;
  83. .@{modalPrefixCls}-dialog {
  84. transform: translateX(100%);
  85. }
  86. }
  87. &&-drawer&-show {
  88. .@{modalPrefixCls}-dialog {
  89. transform: translateX(0%);
  90. }
  91. }
  92. }