Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <section id="home">Home</section>
- <section id="page1">Page 1</section>
- <section id="page2">Page 2</section>
- html,body,section{
- width:100%;
- height:100%;
- margin:0;
- }
- section{
- position:absolute;
- top:0;
- }
- #page1{
- right:100%;
- }
- #page2{
- left:100%;
- }
- var el = document.getElementById('home');
- el.scrollIntoView(true);
- #page1{ left: 100%; }
- #page2{ left: 200%; }
- #home { left: 100%; }
- #page1{ left: 0; }
- #page2{ left: 200%; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement