gsap实现文本聚光灯鼠标跟随遮罩效果代码
代码语言:html
所属分类:悬停
代码描述:gsap实现文本聚光灯鼠标跟随遮罩效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link href="https://fonts.googleapis.com/css?family=Montserrat:900&display=swap" rel="stylesheet">
<style>
body {
font-family: Montserrat,sans-serif;
font-weight: 900;
}
body, body * {
cursor: none;
}
.shapes {
position: relative;
height: 100vh;
width: 100vw;
background: #2128bd;
overflow: hidden;
}
.shape {
will-change: transform;
position: absolute;
border-radius: 50%;
}
.shape.shape-1 {
background: #005ffe;
width: 650px;
height: 650px;
margin: -325px 0 0 -325px;
}
.shape.shape-2 {
background: #ffe5e3;
width: 440px;
height: 440px;
margin: -220px 0 0 -220px;
}
.shape.shape-3 {
background: #ffcc57;
width: 270px;
height: 270px;
margin: -135px 0 0 -135px;
}
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0