imageview.css 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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. -moz-animation-name: zoomIn;
  35. -moz-animation-duration: .3s;
  36. animation-name: zoomIn;
  37. animation-duration: .3s;
  38. }
  39. #imageview #image.small {
  40. top: 50%;
  41. right: auto;
  42. bottom: auto;
  43. left: 50%;
  44. }
  45. /* Previous/Next Buttons ------------------------------------------------*/
  46. #imageview .arrow_wrapper {
  47. position: fixed;
  48. width: 20%;
  49. height: calc(100% - 60px);
  50. top: 60px;
  51. z-index: 1;
  52. }
  53. #imageview .arrow_wrapper.previous {
  54. left: 0;
  55. }
  56. #imageview .arrow_wrapper.next {
  57. right: 0;
  58. }
  59. #imageview .arrow_wrapper a {
  60. position: fixed;
  61. top: 50%;
  62. margin-top: -10px;
  63. color: #fff;
  64. font-size: 50px;
  65. text-shadow: 0px 1px 2px #000;
  66. cursor: pointer;
  67. opacity: 0;
  68. z-index: 2;
  69. -webkit-transition: opacity .2s;
  70. -moz-transition: opacity .2s;
  71. transition: opacity .2s;
  72. }
  73. #imageview .arrow_wrapper:hover a {
  74. opacity: .2;
  75. }
  76. #imageview .arrow_wrapper a#previous {
  77. left: 20px;
  78. }
  79. #imageview .arrow_wrapper a#next {
  80. right: 20px;
  81. }