PhotoSlider.less 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. @keyframes PhotoView__fade {
  2. from {
  3. opacity: 0;
  4. }
  5. to {
  6. opacity: 1;
  7. }
  8. }
  9. .PhotoView {
  10. &-PhotoSlider__clean {
  11. .PhotoView-PhotoSlider__BannerWrap,
  12. .PhotoView-PhotoSlider__ArrowLeft,
  13. .PhotoView-PhotoSlider__ArrowRight,
  14. .PhotoView-PhotoSlider__FooterWrap {
  15. opacity: 0;
  16. &:hover {
  17. opacity: 0;
  18. }
  19. }
  20. }
  21. &-PhotoSlider__Backdrop {
  22. position: absolute;
  23. top: 0;
  24. left: 0;
  25. width: 100%;
  26. height: 100%;
  27. background: rgba(0, 0, 0, 0.6);
  28. z-index: -1;
  29. }
  30. &-PhotoSlider__fadeIn {
  31. opacity: 0;
  32. animation: PhotoView__fade 0.4s linear both;
  33. }
  34. &-PhotoSlider__fadeOut {
  35. opacity: 0;
  36. animation: PhotoView__fade 0.4s linear both reverse;
  37. }
  38. &-PhotoSlider__BannerWrap {
  39. position: absolute;
  40. left: 0;
  41. top: 0;
  42. display: flex;
  43. justify-content: space-between;
  44. align-items: center;
  45. width: 100%;
  46. height: 44px;
  47. color: white;
  48. background-color: rgba(0, 0, 0, 0.5);
  49. transition: opacity 0.2s ease-out;
  50. z-index: 20;
  51. &:hover {
  52. opacity: 1;
  53. }
  54. }
  55. &-PhotoSlider__Counter {
  56. padding: 0 10px;
  57. font-size: 14px;
  58. opacity: 0.75;
  59. }
  60. &-PhotoSlider__BannerRight {
  61. height: 100%;
  62. }
  63. &-PhotoSlider__Close {
  64. box-sizing: border-box;
  65. padding: 10px;
  66. opacity: 0.75;
  67. cursor: pointer;
  68. transition: opacity 0.2s linear;
  69. &:hover {
  70. opacity: 1;
  71. }
  72. }
  73. &-PhotoSlider__ArrowLeft,
  74. &-PhotoSlider__ArrowRight {
  75. position: absolute;
  76. top: 0;
  77. bottom: 0;
  78. display: flex;
  79. justify-content: center;
  80. align-items: center;
  81. width: 70px;
  82. height: 100px;
  83. margin: auto;
  84. opacity: 0.75;
  85. z-index: 20;
  86. cursor: pointer;
  87. user-select: none;
  88. transition: opacity 0.2s linear;
  89. &:hover {
  90. opacity: 1;
  91. }
  92. svg {
  93. box-sizing: content-box;
  94. padding: 10px;
  95. width: 24px;
  96. height: 24px;
  97. fill: white;
  98. background: rgba(0, 0, 0, 0.3);
  99. }
  100. }
  101. &-PhotoSlider__ArrowLeft {
  102. left: 0;
  103. }
  104. &-PhotoSlider__ArrowRight {
  105. right: 0;
  106. }
  107. &-PhotoSlider__FooterWrap {
  108. box-sizing: border-box;
  109. position: absolute;
  110. left: 0;
  111. bottom: 0;
  112. padding: 10px;
  113. width: 100%;
  114. min-height: 44px;
  115. line-height: 1.5;
  116. font-size: 14px;
  117. color: #ccc;
  118. background-color: rgba(0, 0, 0, 0.5);
  119. text-align: justify;
  120. transition: opacity 0.2s ease-out;
  121. z-index: 20;
  122. }
  123. }