Guest User

Untitled

a guest
Mar 19th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. <!--------------- HTML ------------- -->
  2.  
  3. <div class="ctn-title">
  4. <div class="wrap-title">
  5. <div class="holder-title">
  6. <a href="" class="link-title">DECORATION</a>
  7. <a href="" class="link-title">GRAFITTI</a>
  8. <a href="" class="link-title">CLIPPING</a>
  9. <a href="" class="link-title">JOBS</a>
  10. <a href="" class="link-title">DECORATION</a>
  11. </div>
  12. </div>
  13. </div>
  14.  
  15.  
  16. <!--------------- CSS ------------- -->
  17. <style>
  18.  
  19.  
  20. //=========== TITLE
  21. .ctn-title {
  22. position: relative;
  23. height: 40px;
  24.  
  25. .wrap-title {
  26. position: absolute;
  27. height: 100%;
  28. overflow: hidden;
  29.  
  30. .holder-title {
  31. display: flex;
  32. flex-direction: column;
  33.  
  34. a {
  35. color: #FFF;
  36. font-size: 37px;
  37. }
  38. }
  39. }
  40. }
  41.  
  42.  
  43. </style>
  44.  
  45.  
  46. <!--------------- js ------------- -->
  47. <script>
  48.  
  49. /* =================
  50. TL TITLE
  51. ==================== */
  52. var holderT = $('.holder-title');
  53. var goTitle = 43;
  54.  
  55. var tlGoTitle = new TimelineMax({delay:.08, onComplete: backTitle})
  56. .to(holderT, 1,{ y: -goTitle, ease: Power3.easeInOut})//.addPause()
  57. .to(holderT, 1,{ y: -goTitle*2, ease: Power3.easeInOut})//.addPause()
  58. .to(holderT, 1,{ y: -goTitle*3, ease: Power3.easeInOut})//.addPause()
  59. .to(holderT, 1,{ y: -goTitle*4, ease: Power3.easeInOut})
  60. ;
  61.  
  62. function backTitle (){
  63. tlGoTitle.play(0);
  64. }
  65. </script>
Add Comment
Please, Sign In to add comment