TweenLite实现canvas线条跟随鼠标移动视觉差异动画代码
代码语言:html
所属分类:视觉差异
代码描述:TweenLite实现canvas线条跟随鼠标移动视觉差异动画代码
代码标签: TweenLite canvas 线条 跟随 鼠标 移动 视觉差异
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
html {
height: 100%;
}
main {
height: 100%;
}
body {
height: 100%;
background: #02020e;
min-height: 100vh;
overflow: hidden;
}
.canvas-wrap {
height: 100%;
width: 100%;
z-index: 3;
}
.canvas-wrap .shadow-left {
position: absolute;
width: 80px;
height: 100%;
top: 0;
left: 0;
z-index: 1;
background-image: linear-gradient(to left, rgba(9, 1, 24, 0) 0%, #090118 100%);
}
.canvas-wrap .shadow-right {
position: absolute;
width: 80px;
height: 100%;
top: 0;
right: 0;
z-index: 1;
background-image: linear-gradient(to right, rgba(9, 1, 24, 0) 0%, #090118 100%);
}
.canvas-wrap .shadow-top {
position: absolute;
width: 100%;
height: 80px;
top: 0;
left: 0;
z-index: 1;
background-image: linear-gradient(to top, rgba(9, 1, 24, 0) 0%, #090118 100%);
}
.canvas-wrap .shadow-bottom {
position: absolute;
width: 100%;
height: 80px;
bottom: 0;
left: 0;
z-index: 1;
background-image: linear-gradient(to bottom, rgba(9, 1, 24, 0) 0%, #090118 100%);
}
.canvas-wrap:before {
content: "";
position: absolute;
width: 80px;
height: 100%;
top: 0;
right: 0;
z-index: 1;
background-image: linear-gradient(to right, rgba(9, 1, 24, 0) 0%, #090118 100%);
}
.canvas-wrap img {
display: block;
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
z-index: 1;
opacity: .........完整代码请登录后点击上方下载按钮下载查看
















网友评论0