svg菜单点击导航跟随位移动画效果代码

代码语言:html

所属分类:菜单导航

代码描述:svg菜单点击导航跟随位移动画效果代码

代码标签: 导航 跟随 位移 动画 效果

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


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

<head>

  <meta charset="UTF-8">

  
  
<style>
body {
  background-color: #423852;
  overflow: hidden;
}

body,
html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

svg {
  width: 100%;
  height: 100%;
  visibility: hidden;
}

.selectionDot,
#menuShadow,
#dimIconGroup > path,
.menuHit {
  pointer-events: none;
}

.menuItem {
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
</style>




</head>

<body>
  <svg viewBox="0 0 800 600" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid slice">
<defs>
  <pattern patternUnits="userSpaceOnUse"  id="bgPattern" width="4" height="4" x="0" y="0">
    <rect width="4" height="4" fill="#F9F9EF"/>
    
    <rect width="1" height="1" fill="#D6D3CC"/>
  <rect x="3" width="1" height="1" fill="#D6D3CC"/>    
   <rect  x="2" y="3"width="1" height="1" fill="#E6E4DB"/>
  <rect x="4" y="3" width="1" height="1" fill="#E6E4DB"/>    
  </pattern>  
  	<circle id="selectionDot" cy="304" r="27"/>
  
  <clipPath id="menuMask0">
	<circle id="menuDot0"  cx="284" cy="304" r="30"/>
  </clipPath>
  <clipPath id="menuMask1">
  <circle id="menuDot1"  cx="361" cy="304" r="30"/>
  </clipPath>
  <clipPath id="menuMask2">
  <circle id="menuDot2" cx="438" cy="304" r="30"/>
  </clipPath>  
  <clipPath id="menuMask3">
  <circle id="menuDot3"  cx="515"  cy="304" r="30"/>
  .........完整代码请登录后点击上方下载按钮下载查看

网友评论0