imageview.css 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  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,.99);
  12. -webkit-transition: background-color .3s;
  13. }
  14. /* Modes ------------------------------------------------*/
  15. #imageview.view {
  16. background-color: inherit;
  17. }
  18. #imageview.full {
  19. background-color: #040404;
  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, bottom .3s, margin-top .3s;
  32. -webkit-animation-name: zoomIn;
  33. -webkit-animation-duration: .3s;
  34. -webkit-animation-timing-function: cubic-bezier(0.51,.92,.24,1.15);
  35. -moz-animation-name: zoomIn;
  36. -moz-animation-duration: .3s;
  37. -moz-animation-timing-function: cubic-bezier(0.51,.92,.24,1.15);
  38. animation-name: zoomIn;
  39. animation-duration: .3s;
  40. animation-timing-function: cubic-bezier(0.51,.92,.24,1.15);
  41. }
  42. #imageview #image.small {
  43. top: 50%;
  44. right: auto;
  45. bottom: auto;
  46. left: 50%;
  47. }
  48. /* Previous/Next Buttons ------------------------------------------------*/
  49. #imageview .arrow_wrapper {
  50. position: fixed;
  51. width: 20%;
  52. height: calc(100% - 60px);
  53. top: 60px;
  54. z-index: 1;
  55. }
  56. #imageview .arrow_wrapper.previous {
  57. left: 0;
  58. }
  59. #imageview .arrow_wrapper.next {
  60. right: 0;
  61. }
  62. #imageview .arrow_wrapper a {
  63. position: fixed;
  64. top: 50%;
  65. margin-top: -10px;
  66. color: #fff;
  67. font-size: 50px;
  68. text-shadow: 0px 1px 2px #000;
  69. cursor: pointer;
  70. opacity: 0;
  71. z-index: 2;
  72. -webkit-transition: opacity .2s;
  73. -moz-transition: opacity .2s;
  74. transition: opacity .2s;
  75. }
  76. #imageview .arrow_wrapper:hover a {
  77. opacity: .2;
  78. }
  79. #imageview .arrow_wrapper a#previous {
  80. left: 20px;
  81. }
  82. #imageview .arrow_wrapper a#next {
  83. right: 20px;
  84. }