carousel.css 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. *, *::before, *::after {
  2. margin: 0;
  3. padding: 0;
  4. -webkit-box-sizing: border-box;
  5. box-sizing: border-box;
  6. }
  7. .carousel-container {
  8. display: -webkit-box;
  9. display: -ms-flexbox;
  10. display: flex;
  11. }
  12. .carousel-container .root .carousel {
  13. /* border: 2px solid black; */
  14. position: relative;
  15. overflow: hidden;
  16. /* -webkit-box-shadow: 0 0 16px black; */
  17. /* box-shadow: 0 0 16px black; */
  18. }
  19. .carousel-container .root .carousel > .inner {
  20. display: -webkit-box;
  21. display: -ms-flexbox;
  22. display: flex;
  23. -ms-flex-wrap: nowrap;
  24. flex-wrap: nowrap;
  25. }
  26. .carousel-container .root .carousel > .inner img {
  27. width: 100%;
  28. -ms-flex-negative: 0;
  29. flex-shrink: 0;
  30. -webkit-transition: opacity 500ms ease;
  31. transition: opacity 500ms ease;
  32. }
  33. .carousel-container .root .carousel > .inner.loaded img {
  34. opacity: 0;
  35. }
  36. .carousel-container .root .carousel .left, .carousel-container .root .carousel .right {
  37. position: absolute;
  38. width: 50px;
  39. top: 0;
  40. bottom: 0;
  41. z-index: 10;
  42. }
  43. .carousel-container .root .carousel .left::after, .carousel-container .root .carousel .right::after {
  44. font-size: 40px;
  45. font-weight: bold;
  46. color: rgba(255, 255, 255, 0.25);
  47. position: absolute;
  48. left: 50%;
  49. top: 50%;
  50. -webkit-transform: translate(-50%, -50%);
  51. transform: translate(-50%, -50%);
  52. z-index: 20;
  53. }
  54. .carousel-container .root .carousel .left:hover, .carousel-container .root .carousel .right:hover {
  55. cursor: pointer;
  56. }
  57. .carousel-container .root .carousel .left:hover::after, .carousel-container .root .carousel .right:hover::after {
  58. color: rgba(255, 255, 255, 0.75);
  59. }
  60. .carousel-container .root .carousel .left {
  61. left: 0;
  62. }
  63. .carousel-container .root .carousel .left::after {
  64. content: "<";
  65. }
  66. .carousel-container .root .carousel .right {
  67. right: 0;
  68. }
  69. .carousel-container .root .carousel .right::after {
  70. content: ">";
  71. }
  72. .carousel-container .root .dots {
  73. -webkit-box-pack: center;
  74. -ms-flex-pack: center;
  75. justify-content: center;
  76. display: -webkit-box;
  77. display: -ms-flexbox;
  78. display: flex;
  79. }
  80. .carousel-container .root .dots .dot {
  81. background-color: black;
  82. width: 10px;
  83. height: 10px;
  84. margin: 10px;
  85. border-radius: 50%;
  86. position: relative;
  87. }
  88. .carousel-container .root .dots .dot:hover {
  89. cursor: pointer;
  90. }
  91. .carousel-container .root .dots .dot::after {
  92. content: "";
  93. border-radius: 50%;
  94. position: absolute;
  95. border: 2px solid black;
  96. top: -4px;
  97. left: -4px;
  98. right: -4px;
  99. bottom: -4px;
  100. opacity: 0;
  101. -webkit-transition: opacity 500ms ease-in-out;
  102. transition: opacity 500ms ease-in-out;
  103. }
  104. .carousel-container .root .dots .dot.active::after {
  105. opacity: 1;
  106. -webkit-transition: opacity 500ms ease-in-out;
  107. transition: opacity 500ms ease-in-out;
  108. }
  109. /*# sourceMappingURL=style.css.map */