JS or Css page slide transition between 2 full pages

天涯浪子 提交于 2019-12-04 03:59:39
X-spert

You have few solutions, like using Ajax for adding content to "new pages" and add some sliding effect with jQuery. There is some topics about that on Stack Overflow:

slide between pages using jQuery

Clues on sliding between pages effect

Or just add some effect on page ready like in this sample:

<html>
<head>
    <script src="js/jquery-1.7.2.min.js"></script>
    <script>
        $(document).ready(function(){
            $('body div').slideDown();
        });
    </script>
</head>
<body>
    <div style="width: 400px; height: 400px; background-color: blue; display: none;">
        <a href="page2.htm" style="color: white;">PAGE 2>></a>
    </div>
</body>

<html>
<head>
    <script src="js/jquery-1.7.2.min.js"></script>      
    <script>
        $(document).ready(function(){
            $('body div').slideDown();
        });
    </script>
</head>
<body>
    <div style="width: 400px; height: 400px; background-color: red; display: none;">
        <a href="page1.htm" style="color: white;">PAGE 1>></a>
    </div>
</body>

Good luck!

I was looking for a full page transition vs. many examples that show one page with a couple of DIVs. I found that Animate.css does the trick very well.

Demo at this link.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!