lodash打造一个折叠幻灯片效果代码
代码语言:html
所属分类:幻灯片
代码描述:lodash打造一个折叠幻灯片效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css?family=Roboto:400,400i,700");
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
font-family: Roboto, sans-serif;
}
@media screen and (max-width: 500px) {
html,
body {
font-size: 0.8rem;
}
}
@media screen and (max-height: 500px) {
html,
body {
font-size: 0.8rem;
}
}
body {
display: flex;
justify-content: center;
align-items: center;
background-color: #00080e;
}
* {
box-sizing: border-box;
}
.wrapper {
display: flex;
width: 100%;
max-width: 800px;
height: 75%;
max-height: 600px;
perspective: 500px;
transform-style: preserve-3d;
transition: opacity 150ms ease-in-out;
}
.wrapper.loading {
opacity: 0;
}
.destination {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
color: white;
text-shadow: 0 0 6px #00080e;
transition: all 150ms ease-out;
}
.destination h1 {
font-size: 2.5em;
text-align: center;
}
.destination hr {
height: 1px;
background-color: white;
border: none;
width: 50px;
}
.destination p {
font-size: 1.2em;
}
.destination button {
border: none;
background-color: #b71c1c;
font-family: inherit;
color: white;
font-size: 1em;
padding: 0.5em 1em;
margin-top: 1em;
border-radius: 2em;
cursor: pointer;
}
.destination button:hover {
background-color: #d32f2f;
}
.destination img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
object-fit: cover;
}
.destination::after {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
transition: opacity 100ms ease-in;
mix-blend-mode: multiply;
opacity: 0;
pointer-events: none;
}
.destination.unfolded {
flex: 8 1;
}
.destination.unfolded.front {
transform: translateZ(20px);
}
.destination.unfolded.back {
transform: translateZ(-20px);
}
.destination.unfolded.back::after {
backgroun.........完整代码请登录后点击上方下载按钮下载查看
网友评论0