滚动响应式变形动画效果
代码语言:html
所属分类:响应式
代码描述:滚动响应式变形动画效果,滚动鼠标试试
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
body {
background-color: #424242;
width: 100%;
margin: 0px;
font-family: Arial;
margin: 0;
padding: 0;
position: relative;
}
.spacer {
height: 300px;
}
#showcase {
position: relative;
}
#showcase > .deviceWrapper {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 3;
}
#showcase > .deviceWrapper > .device {
position: sticky;
top: 5vh;
width: 80vw;
height: 80vh;
margin: auto;
}
#showcase > .deviceWrapper > .device img {
top: 3%;
opacity: 0.5;
height: 100%;
width: 100%;
}
#showcase > .deviceWrapper > .device * {
position: absolute;
will-change: transform;
}
.border {
background-color: black;
--border-top-width: 3%;
--border-left-width: 3%;
z-index: 3;
}
.border.top,
.border.bottom {
left: 0%;
right: 0%;
height: var(--border-top-width);
}
.border.left,
.border.right {
width: var(--border-left-width);
top: 13%;
bottom: 30%;
border-radius: 4px;
}
.border.top {
top: 13%;
border-radius: 4px;
}
.border.left {
}
.border.right {
right: 0;
}
.border.bottom {
bottom: 30%;
}
.display {
background-color: #eee;
top: 15%;
left: 2%;
right: 2%;
bottom: 32%;
z-index: 4;
border-radius: 3px;
}
.text {
z-index: 5;
background: linear-gradient(
130deg,
rgba(3, 104, 184, 1) 0%,
rgba(0, 212, 255, 1) 100%
);
border-radius: 100px;
}
..........完整代码请登录后点击上方下载按钮下载查看
















网友评论0