<link href="/Uploads/book/15780154153404/OEBPS/Styles/stylesheet.css" rel="stylesheet" type="text/css"/> </head> <body> <h1>第四辑 旅笺<br/> DiSiJi LuJian</h1> <div class="img-center"><img alt="" class="img40" src="/Uploads/book/15780154153404/OEBPS/Images/345-01.jpg"/></div> </body> </html></body> <script> $(function(){ //隐藏这种标签 <h1 class="chapter-1">第一部</h1> $("h1[class^='chapter']").css("display","none"); $("h2[class^='chapter']").css("display","none"); $("body").imagesLoaded() // .always( function( instance ) { // console.log('图片已全部加载,或被确认加载失败'); // }) .done( function( instance ) { var height = $(document).height() + 100; $(window.parent.document).find("iframe").css({"height":height+"px","visibility":"visible"}); $(window.parent.document).find(".jiazaidh").css({"display":"none"}); }) // .fail( function( instance ) { // console.log('图片已全部加载,且至少一个图片加载失败'); // }) // .progress( function( instance, image ) { // console.log('每张图片加载完'); // var result = image.isLoaded ? 'loaded' : 'broken'; // console.log( '加载结果 ' + result + ' 图片地址 ' + image.img.src ); // }); }) var temp = ""; function setStyle(type,data){ if(type=="fontsize"){ $("body").css("font-size",data); } if(type=="fontcolor"){ console.log(data); $("body").css("color",data); } if(type=="scrolltime"){ //计算滚动时间 clearInterval(temp) console.log(data); if(data==0){ return false; } temp = setInterval(scroll, 40); function scroll() { var top = window.parent.document.documentElement.scrollTop || window.parent.document.body.scrollTop; top = top+parseFloat(data); window.parent.scroll(0, top); var actualTop = window.parent.document.documentElement.scrollTop || window.parent.document.body.scrollTop; if (top != actualTop) { clearInterval(temp) } } // var time = $(window.parent.document).height()/100 * data; //$(window.parent.document).find("html").stop().animate({ scrollTop: $(window.parent.document).height() }, time) } } </script>