gsap模仿apple tv实现图片悬浮视觉差异聚焦效果代码
代码语言:html
所属分类:视觉差异
代码描述:gsap模仿apple tv实现图片悬浮视觉差异聚焦效果代码
代码标签: gsap 模仿 apple tv 图片 悬浮 视觉差异 聚焦
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
overscroll-behavior: none;
cursor: none;
transform-style: preserve-3d;
}
* {
margin: 0;
padding: 0;
}
#container {
width: 100vw;
height: 100vh;
display: grid;
place-items: center;
}
.grid {
display: flex;
flex-wrap: wrap;
}
.grid__wrap {
position: relative;
margin: 0 40px;
}
.grid__button {
width: 200px;
height: 50px;
background-color: indigo;
display: grid;
place-items: center;
color: white;
}
.grid__area {
width: 250px;
height: 150px;
position: absolute;
top: 0;
bottom: 0;
left: -100%;
right: -100%;
margin: auto;
}
.cursor {
position: fixed;
top: 0;
left: 0;
z-index: 9999;
pointer-events: none;
contain: layout size style;
}
.cursor__pointer {
position: absolute;
width: 15px;
height: 15px;
background-color: red;
border-radius: 50%;
opacity: 0;
}
.cursor__de.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0