滚动响应式变形动画效果

代码语言: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;
}

.nav.background {
	left: 2%;
	right: 2%;
	height: 6%;
	background-color: white;
	border-radius: 2px;
	z-index: 5;
	transform-origin: top;
}

.top.nav.background {
	top: 15%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

.top.nav.logo {
	top: 16.49%;
	height: 3%;
	left: 4.5%;
	width: 3%;
	z-index: 5;
	border-radius: 3px;
	background: linear-gradient(130deg, #29b6f6 0%, #81d4fa 100%);
}

.top.nav.text {
	top: 16.49%;
	height: 3%;
}

.top.nav.text.one {
	left: 11%;
	width: 14%;
}

.top.nav.text.two {
	left: 29%;
	width: 10%;
}

.top.nav.text.three {
	left: 43%;
	width: 12%;
}

.bottom.nav {
	top: auto;
	bottom: 32%;
}

.bottom.nav.background {
	box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.12), 0 -1px 2px rgba(0, 0, 0, 0.24);
}

.bottom.nav.text {
	top: auto;
	bottom: 33.5%;
	width: 3%;
	height: 3%;
	border-radius: 4px;
}

.bottom.nav.text.one {
	left: 23%;
}

.bottom.nav.text.two {
	left: 48.5%;
}

.bottom.nav.text.three {
	left: 75%;
}

.m.........完整代码请登录后点击上方下载按钮下载查看

网友评论0