js+css实现动态径向圆圈图标菜单鼠标悬停效果代码

代码语言:html

所属分类:菜单导航

代码描述:js+css实现动态径向圆圈图标菜单鼠标悬停效果代码

代码标签: js css 动态 径向 圆圈 图标 菜单 鼠标 悬停

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

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

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

  
  
<style>
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right, rgba(64, 100, 255, 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgba(64, 100, 255, 0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right, rgba(64, 100, 255, 0.1) 1px, transparent 1px), linear-gradient(to bottom, rgba(64, 100, 255, 0.1) 1px, transparent 1px);
  background-size: 100px 100px;
  pointer-events: none;
}

#menu-container {
  width: 50vw;
  aspect-ratio: 1;
  position: relative;
  z-index: 1;
}
#menu-container .menu-slice {
  transition: fill 0.3s ease;
}
#menu-container .menu-slice:hover {
  fill: rgba(255, 255, 255, 0.2);
}
#menu-container .slice-text {
  fill: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  font-weight: 500;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}
#menu-container .following-border {
  stroke: rgba(138, 180, 255, 0.8);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}
#menu-container .menu-text-container {
  .........完整代码请登录后点击上方下载按钮下载查看

网友评论0