imageview.css 2.4 KB

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