js+css实现文字菜单鼠标悬停圈圈遮罩效果代码

代码语言:html

所属分类:菜单导航

代码描述:js+css实现文字菜单鼠标悬停圈圈遮罩效果代码

代码标签: js css 文字 菜单 鼠标 悬停 圈圈 遮罩

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  

  
  
  
<style>
@import url('https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700,800,900&display=swap');

body {
  margin: 0;
  padding: 0;
  cursor: none;
  font-family: 'Poppins', sans-serif;
}

.nav-wrapper {
  width: 100%;
  height: 100vh;
  background: #161616;
}

.nav-wrapper nav {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  position: absolute;
  top: 50%;
}

.link {
  transition: all 0.3s ease;
}

.link span {
  display: inline-block;
  font-weight: bold;
  letter-spacing: 1px;
  color: #fff;
  font-size: 36px;
  text-transform: uppercase;
  pointer-event: none;
  transition: transform 0.1s linear;
}

.cursor {
  pointer-events: none;
  position: fixed;
  padding: 0.3rem;
  background-color: #fff;
  border-radius: 50%;
  mix-blend-mode: difference;
  transition: transform 0.3s ease;
}

.link:hover ~ .cursor {
  transform:translate(-50%, -50%) scale(8);
}


@media screen and (max-width: 1024px) { 

  .nav-wrapper nav {
    flex-direction: column;
  }

}
</style>


  
  
</head>

<body translate="no">
  <div class="nav-wrapper">
  <nav>
    <a href="#" class="link">
      <span>Home</span>
    </a>
    &l.........完整代码请登录后点击上方下载按钮下载查看

网友评论0