纯css实现三维立方体图文幻灯片切换效果代码
代码语言:html
所属分类:幻灯片
代码描述:纯css实现三维立方体图文幻灯片切换效果代码,可上下左右三维翻转。
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet"> <style> *, *::before, *::after { box-sizing: border-box; font-family: "Poppins", sans-serif; transform-style: preserve-3d; } body, html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-size: 12pt; line-height: 18pt; font-weight: 400; color: white; } body { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100vw; height: 100vh; overflow: hidden; background: #444; margin: 0; } .container-3D { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 300px; height: 300px; } .flopper { position: relative; width: auto; height: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: visible; transition: all 0.5s ease-in-out; /*animation: rotate 6s linear infinite;*/ } figure { display: flex; flex-direction: column; align-items: center; justify-content: center; position: absolute; width: 300px; height: 300px; transform-origin: 50% 50%; padding: 20px 25px; box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 2px, rgba(0, 0, 0, 0.07) 0px 2px 4px, rgba(0, 0, 0, 0.07) 0px 4px 8px, rgba(0, 0, 0, 0.07) 0px 8px 16px, rgba(0, 0, 0, 0.07) 0px 16px 32px, rgba(0, 0, 0, 0.07) 0px 32px 64px; border: 1px solid white; } figure div { width: 100%; height: 100px; background: url("//repo.bfw.wiki/bfwrepo/image/5e62ef20b92ee.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_400,h_300,/quality,q_90"); background-size: cover !important; background-position: center !important; background-repeat: no-repeat !important; } .front div { background: url("//repo.bfw.wiki/bfwrepo/image/5fc8aa82a7330.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_400,h_300,/quality,q_90"); } .left div { background: url("//repo.bfw.wiki/bfwrepo/image/61ac60be5ec44.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_400,h_300,/quality,q_90"); } .right div { background: url("//repo.bfw.wiki/bfwrepo/image/61ac6310a18c5.png?x-oss-process=image/auto-orient,1/resize,m_fill,w_400,h_300,/quality,q_90"); } .back div { background: url(".........完整代码请登录后点击上方下载按钮下载查看
网友评论0