gsap实现鼠标悬浮文字字母拆分翻动动画效果代码
代码语言:html
所属分类:悬停
代码描述:gsap实现鼠标悬浮文字字母拆分翻动动画效果代码
代码标签: gsap 鼠标 悬浮 文字 字母 拆分 翻动 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <style> @import url("https://fonts.googleapis.com/css2?family=Oranienbaum&display=swap"); * { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; } body { background-color: #222; width: 100%; height: 100vh; display: flex; align-items: center; justify-content: center; } .menu { display: flex; justify-content: space-between; width: 100%; max-width: 700px; margin: 0 auto; } .menu-item { list-style: none; } .menu-item > a { text-transform: uppercase; cursor: pointer; overflow: hidden; display: block; color: #fff; } .menu-item__text > span { display: inline-block; font-size: 2.25rem; } </style> </head> <body> <ul class="menu"> <li class="js-menu-item menu-item"> <a> <div class="menu-item__text">Top</div> </a> </li> <li class="js-menu-item menu-item"> <a> <div class="menu-item__text">About</div> </a> </li> <li class="js-menu-item menu-item"> <a> <div class="menu-item__text">Works</div> </a> </li> <li class="js-menu-item menu-item"> <a> <div class="menu-item__text">Event</div> </a> </li> <li class="js-menu-item menu-item"> <a> <div class="menu-item__text">Contact</div> <.........完整代码请登录后点击上方下载按钮下载查看
网友评论0