_outer-nav.sass 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. // tympanus.net/codrops/2013/12/18/perspective-page-view-navigation/
  2. .perspective
  3. position: relative
  4. width: 100%
  5. height: 100%
  6. overflow: hidden
  7. &--modalview
  8. position: fixed
  9. perspective: 1500px
  10. .container
  11. position: relative
  12. transform: translateZ(0) translateX(0) rotateY(0deg)
  13. min-height: 100%
  14. outline: 30px solid $highlight
  15. transition: transform .4s
  16. .modalview
  17. .container
  18. position: absolute
  19. width: 100%
  20. height: 100%
  21. overflow: hidden
  22. backface-visibility: hidden
  23. .effect-rotate-left
  24. .container
  25. transform-origin: 0% 50%
  26. transition: transform .4s
  27. &--animate
  28. .container
  29. transform: translateZ(-1800px) translateX(-50%) rotateY(45deg)
  30. outline: 30px solid $highlight
  31. .outer-nav
  32. position: absolute
  33. top: 50%
  34. left: 55%
  35. transform: translateY(-50%)
  36. transform-style: preserve-3d
  37. margin: 0
  38. padding: 0
  39. list-style: none
  40. text-align: center
  41. visibility: hidden
  42. transition: visibility 0s .2s
  43. &.is-vis
  44. visibility: visible
  45. &--return
  46. position: absolute
  47. top: 0
  48. left: 0
  49. width: 100%
  50. height: 100%
  51. display: none
  52. cursor: pointer
  53. z-index: 11
  54. &.is-vis
  55. display: block
  56. & > li
  57. transform-style: preserve-3d
  58. transform: translateX(350px) translateZ(-1000px)
  59. font-size: 55px
  60. font-weight: 900
  61. opacity: 0
  62. cursor: pointer
  63. transition: transform .2s, opacity .2s
  64. &.is-vis
  65. transform: translateX(0) translateZ(0)
  66. opacity: 1
  67. transition: transform .4s, opacity .4s
  68. &::before
  69. content: ""
  70. position: absolute
  71. top: 50%
  72. left: 50%
  73. transform: translate(-50%, -25%)
  74. width: 110%
  75. height: 15px
  76. opacity: 0
  77. background-color: $highlight
  78. &.is-active::before
  79. opacity: 1
  80. @media (max-width: 767px)
  81. font-size: 44px
  82. @media (max-width: 600px)
  83. font-size: 34px
  84. li.is-vis:nth-child(2)
  85. transition-delay: .04s
  86. li.is-vis:nth-child(3)
  87. transition-delay: .08s
  88. li.is-vis:nth-child(4)
  89. transition-delay: .12s
  90. li.is-vis:nth-child(5)
  91. transition-delay: .16s