<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title></title> <script type="text/javascript" language="javascript" src="https://www.jb51.net/ajaxjs/jquery-1.4.2.min.js"></script> <script type="text/javascript" language="javascript"> $(function() { $("#right").click(function() { var roll = $("<div></div>", { css: { position: "absolute", border: "solid 1px #999", left: "806px", top: "10px", height: "494px", width: "1px", background: "#fff"}}).appendTo($("#book").parent()); $(roll).animate({ left: "10px", width: "398px" }, 1000, function() { $("#left").css({"background":"#fff"}); $(roll).fadeOut(300, function() { $(roll).remove(); }) }); }); }); </script> </head> <body> <div> <div></div> <div><p>点这翻页 </p></div> </div> </body> </html>
以上所述是小编给大家介绍的基于JS实现翻书效果的页面切换样式,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!
您可能感兴趣的文章: