TweenMax实现文字菜单鼠标悬浮图片跟随显示效果代码
代码语言:html
所属分类:菜单导航
代码描述:TweenMax实现文字菜单鼠标悬浮图片跟随显示效果代码
代码标签: TweenMax 文字 菜单 鼠标 悬浮 图片 跟随 显示
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css?family=Montserrat:900");
*,
*::after,
*::before {
box-sizing: border-box;
}
body {
background-color: #1a1a1a;
}
a {
text-decoration: none;
color: var(--color-link);
outline: none;
font-family: "Montserrat", sans-serif;
}
a + a {
margin-top: 30px;
}
.content {
display: flex;
height: 100vh;
justify-content: center;
flex-direction: column;
width: 100%;
overflow: hidden;
position: relative;
align-items: center;
}
.distort {
position: absolute;
pointer-events: none;
will-change: transform;
}
.distort__img {
opacity: 0;
}
.menu {
display: flex;
flex-direction: column;
align-items: stretch;
text-align: center;
font-size: 10vh;
font-weight: normal;
}
.menu__link {
z-index: 999;
color: #fff;
position: relative;
white-space: nowrap;
}
.menu__link:hover {
color: #fff;
opacity: 0.85;
}
</style>
</head>
<body translate="no">
<div class="content">
<svg class="distort" width="350" height="450" viewBox="0 0 350 450">
<filter id="distortionFilter">
<feTurbulence type="turbulence" baseFrequency="0.07 0.01" numOctaves="5" seed="2" stitchTiles="stitch" x=".........完整代码请登录后点击上方下载按钮下载查看
















网友评论0