CSS3 制作的書(shū)本翻頁(yè)特效

實(shí)現(xiàn)效果:
實(shí)現(xiàn)代碼:
html
<!-- Please heart it if you like! --> <div id='book'> <div id='top'></div> <div id='front'></div> <div id='right'></div> <div id='bottom'></div> <div id='shadow'></div> <div id='bookmark'> <div> <div> <div> <div></div> </div> </div> </div> </div> <div id='bookmark-shadow'></div> </div> <div id='flip'> <div id='front'> <div> <div> <div> <div> <div> <div> <div> <div> <div> <div></div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div id='back'> <div> <div> <div> <div> <div> <div> <div> <div> <div> <div></div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <h4>CSS 3D Bending Effect - Page Flip</h4>
CSS3
/* remember to use - transform-style: preserve-3d; */ html,body { height:100%; overflow: hidden; } body { background: radial-gradient(#E4CEA6, #9C8763); perspective: 900px; margin: 0; } #flip { animation: wrapper 6s ease-in-out infinite; height: 350px; width: 253px; position: absolute; left: 50%; top: 30%; transform: translateZ(-10px) rotateX(60deg) rotateZ(29deg) rotateY(0deg)!important; transform-style: preserve-3d; transform-origin: 0 0 0; } @keyframes wrapper { 50% { transform: translateZ(-10px) rotateX(60deg) rotateZ(29deg) rotateY(-180deg); } } #flip div { height: 350px; width: 24px; position: absolute; left: calc(100% - 1px); transform-origin: 0 100%; transform-style: preserve-3d; background-size: 253px 350px; } #flip #front, #flip #front div { background-image: url(http://blogs.slj.com/afuse8production/files/2012/06/Hobbit1.jpg); box-shadow: inset rgba(255,255,255,0.3) 0px -1px 0 0,#35582C 0px 1px 0px 0px; } #flip #front > div > div > div > div > div > div > div > div > div > div { box-shadow: inset rgba(255,255,255,0.3) -1px -1px 0 0, #35582C 1px 1px 0px 0px; } #flip #back { transform: rotateY(.4deg); transform-origin: -100% 0; } /* avoid pages overlap */ #flip #back, #flip #back div { background-image: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/164210/map1_.jpg); } #flip > div { left: 0; background-position-x: 0; } #flip div > div { background-position-x: -23px; animation: page 6s ease-in-out infinite; } #flip div > div > div { background-position-x : -46px; } #flip div > div > div > div { background-position-x : -69px; } #flip div > div > div > div > div { background-position-x : -92px; } #flip div > div > div > div > div > div { background-position-x : -115px; } #flip div > div > div > div > div > div > div { background-position-x : -138px; } #flip div > div > div > div > div > div > div > div { background-position-x : -161px; } #flip div > div > div > div > div > div > div > div > div { background-position-x : -184px; } #flip div > div > div > div > div > div > div > div > div > div { background-position-x : -207px; } #flip div > div > div > div > div > div > div > div > div > div > div { background-position-x : -229px; } /* the more pieces you have, the smoother the bend is */ @keyframes page { 15% { transform: rotateY(-10deg); } 50% { transform: rotateY(-2deg); } 65% { transform: rotateY(10deg); } 100% { transform: rotateY(0deg); } } #book { width: 248px; height: 350px; position: absolute; left:50%; top: 30%; transform: translate3d(0px,0px,-10px) rotateX(60deg) rotateZ(29deg); transform-style: preserve-3d; -webkit-transform-origin: 0 0 0; } @keyframes book { 25% { box-shadow: inset rgba(0,0,0,.2) 0px 0 50px -140px; } 50% { box-shadow: inset rgba(0,0,0,.2) 0px 0 50px -140px; } 100% { box-shadow: inset rgba(0,0,0,.2) 510px 0 50px -140px; } } #book #top { animation: book 6s ease-in-out infinite; background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/164210/map2.jpg); background-size: 100% 100%; background-position: 100%; box-shadow: inset rgba(0,0,0,0.2) 510px 0 50px -140px; height: 350px; width: 248px; position: absolute; left: 0; top: 0; } #book #bottom { background: #E7DED1; box-shadow: rgba(83, 53, 13, 0.2) 4px 2px 1px, #35582C 1px 1px 0px 0px; height: 350px; width: 253px; position: absolute; transform: translateZ(-40px); left: 0; top: 0; } #book #shadow { animation: shadow 6s ease-in-out infinite; box-shadow: inset rgba(83, 53, 13, 0) -200px 0 150px -140px; height: 350px; width: 248px; position: absolute; left: -100%; top: 0; transform: translateZ(-40px); } @keyframes shadow { 20% { box-shadow: inset rgba(83, 53, 13, 0) -200px 0 150px -140px; } 50% { box-shadow: inset rgba(83, 53, 13, 0.3) -350px 0 150px -140px; } 60% { box-shadow: inset rgba(83, 53, 13, 0) -200px 0 150px -140px; } } #book #front { background: -webkit-linear-gradient(top,#FCF6EA, #D8D1C3); background-size: 100% 2px; box-shadow: inset #C2BBA2 3px 0 0px, #35582C -2px 1px 0px 0px; height: 40px; width: 251px; left: -3px; position: absolute; bottom: -40px; transform: rotateX(-90deg); transform-origin: 50% 0; border-top-left-radius: 5px; border-bottom-left-radius: 5px; } #book #right { background: -webkit-linear-gradient(left,#DDD2BB, #BDB3A0); background-size: 2px 100%; box-shadow: inset rgba(0,0,0,0) 0 0 0 20px; height: 100%; width: 40px; position: absolute; right: -40px; top: 0; transform: rotateY(90deg); transform-origin: 0 50%; } h4 { position: absolute; bottom: 20px; left: 20px; margin: 0; font-weight: 200; opacity: 1; font-family: sans-serif; color: rgba(0,0,0,0.3); } /* bookmark */ #bookmark { position: absolute; transform: translate3d(20px,350px,-16px); transform-style: preserve-3d; } #bookmark div { background: rgb(151, 88, 88); box-shadow: rgb(133,77,77) 1px 0; height: 10px; width: 20px; position: absolute; top: 9px; transform: rotateX(-14deg); transform-origin: 50% 0; transform-style: preserve-3d; } #bookmark > div > div { background: linear-gradient(top, rgb(151, 88, 88), rgb(189, 123, 123), rgb(151, 88, 88)); } #bookmark > div > div > div { background: linear-gradient(top,rgb(151, 88, 88),rgb(133, 77, 77)); } #bookmark > div > div > div > div { background: none; border-top: 0px solid transparent; border-right: 10px solid rgb(133, 77, 77); border-bottom: 10px solid transparent; border-left: 10px solid rgb(133, 77, 77); height: 0; width: 0; } #bookmark-shadow { background: linear-gradient(top,rgba(83, 53, 13, 0.25),rgba(83, 53, 13, 0.11)); height: 15px; width: 20px; position: absolute; transform: translate3d(12px,350px,-25px) rotateX(-90deg) skewX(20deg); transform-origin: 0 0; }
以上就是CSS3 制作的書(shū)本翻頁(yè)特效的詳細(xì)內(nèi)容,更多關(guān)于CSS3 書(shū)本翻頁(yè)特效的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!
相關(guān)文章
css3實(shí)現(xiàn)書(shū)本翻頁(yè)效果的示例代碼
這篇文章主要介紹了css3實(shí)現(xiàn)書(shū)本翻頁(yè)效果的示例代碼,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)2021-03-08css3鼠標(biāo)懸停圖片3D翻頁(yè)顯示文字描述特效
css3鼠標(biāo)懸停圖片3D翻頁(yè)顯示文字描述特效是一款css3制作的鼠標(biāo)懸停圖片3D翻頁(yè)顯示文字介紹,非常好看的圖文翻轉(zhuǎn)展示特效。2020-09-10純CSS3實(shí)現(xiàn)雜志翻頁(yè)動(dòng)畫(huà)特效
這是一個(gè)實(shí)現(xiàn)純CSS3雜志翻頁(yè)動(dòng)畫(huà)特效源碼,可點(diǎn)擊前后導(dǎo)航按鈕,來(lái)像翻閱雜志一樣,前后翻看不同的頁(yè)面,簡(jiǎn)單實(shí)用2020-03-18純CSS3實(shí)現(xiàn)的書(shū)籍自動(dòng)翻頁(yè)動(dòng)畫(huà)效果源碼
這是一款基于純CSS3實(shí)現(xiàn)的書(shū)籍自動(dòng)翻頁(yè)動(dòng)畫(huà)效果源碼。畫(huà)面中心擺放著一本書(shū),隨著書(shū)籍封面的打開(kāi),其內(nèi)部紙張頁(yè)面也逐頁(yè)自動(dòng)翻開(kāi),紙張翻動(dòng)帶有較為逼真的立體視覺(jué)效果2019-07-26js+css3實(shí)現(xiàn)的翻頁(yè)動(dòng)畫(huà)效果數(shù)字時(shí)鐘源碼
這是一款基于js+css3實(shí)現(xiàn)的翻頁(yè)動(dòng)畫(huà)效果數(shù)字時(shí)鐘源碼。畫(huà)面中的數(shù)字時(shí)鐘呈現(xiàn)出翻頁(yè)變換顯示時(shí)間的效果2017-08-15純css3實(shí)現(xiàn)的書(shū)本翻頁(yè)動(dòng)畫(huà)特效源碼
這是一款基于純css3實(shí)現(xiàn)的書(shū)本翻頁(yè)動(dòng)畫(huà)特效源碼。界面上呈現(xiàn)出書(shū)頁(yè)的翻動(dòng)展開(kāi)與折疊動(dòng)畫(huà)效果,動(dòng)畫(huà)效果流暢自然2017-02-15CSS3實(shí)現(xiàn)的答題卡翻頁(yè)切換特效源碼
是一款實(shí)現(xiàn)了問(wèn)答式答題卡翻頁(yè)切換效果代碼,成功回答當(dāng)前答題卡上的問(wèn)題后,該卡片就會(huì)上滑小時(shí),從而突顯出下一張答題卡及內(nèi)容,本段代碼適應(yīng)于所有網(wǎng)頁(yè)使用,有需要的朋2016-10-28jQuery和CSS3實(shí)現(xiàn)彈性過(guò)渡全屏翻頁(yè)特效源碼
jQuery和CSS3實(shí)現(xiàn)彈性過(guò)渡全屏翻頁(yè)特效源碼是一款可以通過(guò)點(diǎn)擊導(dǎo)航按鈕來(lái)全屏切換頁(yè)面,在頁(yè)面切換時(shí),整個(gè)頁(yè)面以彈性變形的方式過(guò)渡到下一個(gè)頁(yè)面。本段代碼適應(yīng)于所有網(wǎng)頁(yè)2016-08-26jQuery+CSS3實(shí)現(xiàn)的全屏垂直翻頁(yè)特效源碼
jQuery+CSS3全屏垂直翻頁(yè)代碼是一款帶過(guò)渡效果的全屏垂直翻頁(yè)特效插件,該全屏翻頁(yè)插件在頁(yè)面上下滾動(dòng)時(shí)一次翻一屏,并帶有CSS3過(guò)渡動(dòng)畫(huà)效果2015-03-11一款很酷的CSS3翻頁(yè)時(shí)鐘動(dòng)畫(huà)特效源碼
今天我們來(lái)分享一款風(fēng)格獨(dú)特的時(shí)鐘特效源碼,這款CSS3時(shí)鐘動(dòng)畫(huà)是一款數(shù)字時(shí)鐘,時(shí)間每過(guò)一秒,相應(yīng)的位置就會(huì)像翻日歷一樣翻過(guò)去。另外,這款CSS3數(shù)字時(shí)鐘有點(diǎn)立體的效果,2014-11-22