css+div实现翻书翻页效果代码
代码语言:html
所属分类:其他
代码描述:css+div实现翻书翻页效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
padding: 0;
background: linear-gradient(90deg, #fff 50%, #4a1010 50%);
}
input {
display: none;
}
img {
max-width: 100%;
object-fit: cover;
}
.book {
display: flex;
}
.book img {
width: 100%;
height: 100%;
}
#cover {
width: 250px;
height: 400px;
}
.flip-book {
width: 250px;
height: 400px;
position: relative;
perspective: 1500px;
}
.flip {
position: absolute;
width: 100%;
height: 100%;
inset: 0;
transform-origin: left;
transform-style: preserve-3d;
transform: rotateY(0deg);
transition: 500ms;
color: #000;
}
p {
font-size: 14px;
line-height: 24px;
}
.front {
position: absolute;
inset: 0;
background-color: #fff;
box-sizing: border-box;
box-shadow: inset 20px 0 50px rgba(0,0,0,0.5), 0 2px 5px rgba(0,0,0,0.5);
padding: 0 13px;
}
.back {
position: absolute;
inset: 0;
z-index: 9;
backface-visibility: hidden;
background-color: #000;
transform: rotateY(180deg);
}
.back-btn,.next-btn {
position: absolute;
b.........完整代码请登录后点击上方下载按钮下载查看
网友评论0