_viewer-360.scss 657 B

123456789101112131415161718192021222324252627282930313233
  1. // 360 Degree Viewer
  2. // The number of images
  3. $image-height: 9rem;
  4. $image-number: 36 !default;
  5. $image-width: 24rem;
  6. .viewer-360 {
  7. align-items: center;
  8. display: flex;
  9. flex-direction: column;
  10. @for $s from 1 through ($image-number) {
  11. .viewer-slider[value='#{$s}'] + .viewer-image {
  12. background-position-y: percentage((($s)-1) * 1/(($image-number)-1));
  13. }
  14. }
  15. .viewer-slider {
  16. cursor: ew-resize;
  17. margin: 1rem;
  18. order: 2;
  19. width: 60%;
  20. }
  21. .viewer-image {
  22. background-position-y: 0;
  23. background-repeat: no-repeat;
  24. background-size: 100%;
  25. height: $image-height;
  26. order: 1;
  27. width: $image-width;
  28. }
  29. }