您好,登錄后才能下訂單哦!
如何制作HTML5電子書(shū)翻頁(yè)動(dòng)畫特效,針對(duì)這個(gè)問(wèn)題,這篇文章詳細(xì)介紹了相對(duì)應(yīng)的分析和解答,希望可以幫助更多想解決這個(gè)問(wèn)題的小伙伴找到更簡(jiǎn)單易行的方法。
這款HTML5翻頁(yè)動(dòng)畫可以用鼠標(biāo)拖動(dòng)頁(yè)面來(lái)模擬手動(dòng)翻頁(yè)的效果,也可以點(diǎn)擊書(shū)頁(yè)的邊框來(lái)快速翻頁(yè)。
在線演示地址如下:
http://demo.jb51.net/js/2016/html5-book-page/
實(shí)現(xiàn)的代碼:
XML/HTML Code復(fù)制內(nèi)容到剪貼板
<div id="shineflip"> <div id="shineflip-pages"> <canvas id="shineflip-canvas"></canvas> <canvas id="shineflip-page-mid-canvas"></canvas> <section class="page"> <div><img src="images/0.jpg" width="475" height="482" /></div> <span style="left:18px;"><img src="images/zh.png" height="482" /></span> </section> <section class="page" style="background:url(images/left_pk.jpg)"> <div><img src="images/1.jpg" width="466" height="463" style="float:right;margin-top:9px;" /></div> </section> <section class="page"> <div><img src="images/2.jpg" width="466" height="463" style="float:left;margin-top:9px;" /></div> </section> <section class="page"> <div><img src="images/3.jpg" width="466" height="463" style="float:right;margin-top:9px;" /></div> </section> <section class="page"> <div><img src="images/4.jpg" width="466" height="463" style="float:left;margin-top:9px;" /></div> </section> <section class="page"> <div><img src="images/5.jpg" width="466" height="463" style="float:right;margin-top:9px;" /></div> </section> <section class="page" style="background:url(images/right_pk.jpg)"> <div><img src="images/6.jpg" width="466" height="463" style="float:left;margin-top:9px;" /></div> </section> <section class="page"> <div><img src="images/24.jpg" width="475" height="482" /></div> <span style="right:18px;"><img src="images/zh.png" height="482" /></span> </section> </div> </div> CSS樣式: CSS Code復(fù)制內(nèi)容到剪貼板 body, h3, p { margin: 0; padding: 0; } body { background: url("../images/cover.jpg") no-repeat; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; color: #333; font-family: Helvetica, sans-serif; text-align:center; } #shineflip { /*background: url("../images/cover.jpg") no-repeat;*/ -o-background-size: 100% 100%; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; background-size: 100% 100%; position: absolute; } #shineflip-pages { /* background-color:#fafafa;*/ background-repeat: repeat; position: absolute; z-index: 2; } #shineflip-pages section.cover_front, #shineflip-pages section.cover_background{ position: absolute; overflow: hidden; color: #ffffff; } #shineflip-pages .cover_front_content { position: absolute; z-index: 1; overflow:hidden; whitewhite-space:nowrap; -ms-user-select:none; -webkit-user-select:none; -moz-user-select:none; } #shineflip-pages .cover_front_back { position: absolute; z-index: 0; } #shineflip-pages .cover_background_content { position: absolute; z-index: 1; overflow:hidden; whitewhite-space:nowrap; -ms-user-select:none; -webkit-user-select:none; -moz-user-select:none; } #shineflip-pages .cover_background_back { position: absolute; z-index: 0; } #shineflip-pages section.pageflip { display: block; position: absolute; overflow: hidden; } #shineflip-pages section.page { //background-color: #fafafa; display: block; position: absolute; overflow: hidden; } #shineflip-pages-flipcontent,#shineflip-pages section>div { display: block; font-size: 12px; position: absolute; overflow: hidden; width:100%; height:100%; } #shineflip-pages-flipcontent,#shineflip-pages section>span { display: block; font-size: 12px; position: absolute; overflow: hidden; } #shineflip-pages-flipcontent p, #shineflip-pages-flipcontent h3, #shineflip-pages section p, #shineflip-pages section h3 { line-height: 1.4em; text-align: justify; } #shineflip-canvas { position: absolute; z-index: 0; } #shineflip-page-mid-canvas { position: absolute; pointer-events: none; z-index: 0; }
關(guān)于如何制作HTML5電子書(shū)翻頁(yè)動(dòng)畫特效問(wèn)題的解答就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,如果你還有很多疑惑沒(méi)有解開(kāi),可以關(guān)注億速云行業(yè)資訊頻道了解更多相關(guān)知識(shí)。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。