Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
Sushil010 committed Aug 21, 2024
1 parent 6a91039 commit 6418210
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 5 deletions.
4 changes: 3 additions & 1 deletion cloned-sites/cyberfiction/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@




<div id="main">

<div id="page1">
<canvas></canvas>
</div>
<div id="page2"></div>
<div id="page3"></div>
<div id="page4"></div>
</div>


Expand Down
46 changes: 45 additions & 1 deletion cloned-sites/cyberfiction/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,4 +420,48 @@ function canvasimg(){
});
}

canvasimg();
canvasimg();





gsap.to("#page1",{
scrollTrigger:{
trigger:"#page1",
start:"top top",
end:"bottom top",
scroller:"#main",
pin:true
}
})

gsap.to("#page2",{
scrollTrigger:{
trigger:"#page2",
start:"top top",
end:"bottom top",
scroller:"#main",
pin:true
}
})

gsap.to("#page3",{
scrollTrigger:{
trigger:"#page3",
start:"top top",
end:"bottom top",
scroller:"#main",
pin:true
}
})

gsap.to("#page4",{
scrollTrigger:{
trigger:"#page4",
start:"top top",
end:"bottom top",
scroller:"#main",
pin:true
}
})
6 changes: 3 additions & 3 deletions cloned-sites/cyberfiction/stle.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ html,body{
}

#page1 canvas{
position: relative;
/* position: relative; */
max-height: 100vh;
max-width: 100vw;
}


/*

#page1{
height: 100vh;
width: 100vw;
Expand All @@ -44,4 +44,4 @@ html,body{
height: 100vh;
width: 100vw;
background-color: rgba(255, 187, 0, 0.804);
} */
}

0 comments on commit 6418210

Please sign in to comment.