_imageview.scss 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**
  2. * @copyright 2014 by Tobias Reich
  3. */
  4. #imageview {
  5. position: fixed;
  6. display: none;
  7. width: 100%;
  8. min-height: 100%;
  9. background-color: rgba(10,10,10,.98);
  10. transition: background-color .3s;
  11. }
  12. /* Modes ------------------------------------------------*/
  13. #imageview.view {
  14. background-color: inherit;
  15. }
  16. #imageview.full {
  17. background-color: rgba(0,0,0,1);
  18. }
  19. /* ImageView ------------------------------------------------*/
  20. #imageview #image {
  21. position: absolute;
  22. top: 60px;
  23. right: 30px;
  24. bottom: 30px;
  25. left: 30px;
  26. background-repeat: no-repeat;
  27. background-position: 50% 50%;
  28. background-size: contain;
  29. transition: top .3s, right .3s, bottom .3s, left .3s, margin-top .3s, opacity .2s, transform .3s cubic-bezier(0.51,.92,.24,1.15);
  30. animation-name: zoomIn;
  31. animation-duration: .3s;
  32. animation-timing-function: cubic-bezier(0.51,.92,.24,1.15);
  33. }
  34. #imageview #image.small {
  35. top: 50%;
  36. right: auto;
  37. bottom: auto;
  38. left: 50%;
  39. }
  40. #imageview #image.full {
  41. top: 0px;
  42. right: 0px;
  43. bottom: 0px;
  44. left: 0px;
  45. }
  46. /* Previous/Next Buttons ------------------------------------------------*/
  47. #imageview .arrow_wrapper {
  48. position: fixed;
  49. width: 20%;
  50. height: calc(100% - 60px);
  51. top: 60px;
  52. z-index: 1;
  53. }
  54. #imageview .arrow_wrapper.previous {
  55. left: 0;
  56. }
  57. #imageview .arrow_wrapper.next {
  58. right: 0;
  59. }
  60. #imageview .arrow_wrapper a {
  61. position: fixed;
  62. top: 50%;
  63. margin-top: -10px;
  64. color: #fff;
  65. font-size: 50px;
  66. text-shadow: 0px 1px 2px #000;
  67. cursor: pointer;
  68. opacity: 0;
  69. z-index: 2;
  70. transition: opacity .2s;
  71. }
  72. #imageview .arrow_wrapper:hover a {
  73. opacity: .2;
  74. }
  75. #imageview .arrow_wrapper a#previous {
  76. left: 20px;
  77. }
  78. #imageview .arrow_wrapper a#next {
  79. right: 20px;
  80. }