_slider.scss 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. .slider {
  2. position: relative;
  3. height: 400px;
  4. width: 100%;
  5. // Fullscreen slider
  6. &.fullscreen {
  7. height: 100%;
  8. width: 100%;
  9. position: absolute;
  10. top: 0;
  11. left: 0;
  12. right: 0;
  13. bottom: 0;
  14. ul.slides {
  15. height: 100%;
  16. }
  17. ul.indicators {
  18. z-index: 2;
  19. bottom: 30px;
  20. }
  21. }
  22. .slides {
  23. background-color: $slider-bg-color;
  24. margin: 0;
  25. height: 400px;
  26. li {
  27. opacity: 0;
  28. position: absolute;
  29. top: 0;
  30. left: 0;
  31. z-index: 1;
  32. width: 100%;
  33. height: inherit;
  34. overflow: hidden;
  35. img {
  36. height: 100%;
  37. width: 100%;
  38. background-size: cover;
  39. background-position: center;
  40. }
  41. .caption {
  42. color: #fff;
  43. position: absolute;
  44. top: 15%;
  45. left: 15%;
  46. width: 70%;
  47. opacity: 0;
  48. p { color: $slider-bg-color-light; }
  49. }
  50. &.active {
  51. z-index: 2;
  52. }
  53. }
  54. }
  55. .indicators {
  56. position: absolute;
  57. text-align: center;
  58. left: 0;
  59. right: 0;
  60. bottom: 0;
  61. margin: 0;
  62. .indicator-item {
  63. display: inline-block;
  64. position: relative;
  65. cursor: pointer;
  66. height: 16px;
  67. width: 16px;
  68. margin: 0 12px;
  69. background-color: $slider-bg-color-light;
  70. transition: background-color .3s;
  71. border-radius: 50%;
  72. &.active {
  73. background-color: $slider-indicator-color;
  74. }
  75. }
  76. }
  77. }