vue3+css实现动态数据配置渲染的3d可翻页数据效果代码
代码语言:html
所属分类:布局界面
代码描述:vue3+css实现动态数据配置渲染的3d可翻页数据效果代码
代码标签: vue css 动态 数据 配置 渲染 3d 翻页 数据
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vue 翻页书籍效果</title>
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/vue.global.prod.3.5.21.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');
:root {
--book-width: 350px;
--book-height: 580px;
--page-bg: #1c1c1e;
--text-primary: #ffffff;
--text-secondary: #8d8d92;
--accent-yellow: #feca57;
--accent-green: #78e08f;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
margin: 0;
font-family: 'Noto Sans SC', sans-serif;
background: #e0e0e5;
overflow: hidden;
}
#app {
position: relative;
width: calc(var(--book-width) * 2);
height: calc(var(--book-height));
display: flex;
align-items: center;
justify-content: center;
}
.book {
width: 100%;
height: 100%;
position: relative;
perspective: 2000px;
transform-style: preserve-3d;
filter: drop-shadow(0 15px 30px rgba(0,0,0,0.25));
}
.page {
width: var(--book-width);
height: var(--book-height);
position: absolute;
top: 0;
right: 0;
transform-origin: left center;
transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
transform-style: preserve-3d;
cursor: pointer;
user-select: none;
}
.page.flipped {
transform: rotateY(-180deg);
}
.page-face {
position: absolute;
width: 100%;
height: 100%;
padding: 24px;
box-sizing: border-box;
backface-visibility: hidden;
display: flex;
flex-direction: column;
overflow: hidden;
backg.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0