gsap+boxicons实现悬浮加号按钮点击弹出子菜单效果代码
代码语言:html
所属分类:菜单导航
代码描述:gsap+boxicons实现悬浮加号按钮点击弹出子菜单效果代码
代码标签: gsap boxicons 悬浮 加号 按钮 点击 弹出 子菜单
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600&display=swap" rel="stylesheet"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/boxicons.min.css"> <style> @charset "UTF-8"; * { box-sizing: border-box; } body { background-color: #f2f5ff; color: #31507d; display: flex; font-family: "Poppins", sans-serif; height: 100vh; justify-content: center; margin-top: 100px; } .container { background-color: #fff; border-radius: 50px; box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 4px, rgba(0, 0, 0, 0.1) 0px 7px 13px -3px, rgba(0, 0, 0, 0.1) 0px -3px 0px inset; height: 50px; overflow: hidden; width: 50px; } .container .navigation-item a { align-items: center; color: #317194; display: flex; font-size: 24px; height: 40px; justify-content: center; position: relative; text-decoration: none; width: 40px; } .container .navigation-item a:focus { -webkit-animation-name: jiggle; animation-name: jiggle; -webkit-animation-duration: 700ms; animation-duration: 700ms; -webkit-animation-iteration-count: 1; animation-iteration-count: 1; -webkit-animation-timing-function: ease; animation-timing-function: ease; -webkit-animation-fill-mode: forwards; animation-fill-mode: forwards; background-color: #6bc6ff; border: 2px solid #fff; border-radius: 50px; color: #0546fa; content: ""; } .container .navigation-item a:before { font-family: "boxicons"; } .container .navigation-item a.dashboard:before { content: ""; } .container .navigation-item a.calendar:before { content: ""; } .container .navigation-item a.analytics:before { content: ""; } .container .navigation-item a.users:before { content: ""; } .container .navigation-item a.settings:before { content: ""; } .container #toggle { align-items: center; cursor: pointer; display: flex; font-size: 24px; height: 50px; justify-content: center; text-decoration: none; width: 50px; } .container #toggle:focus { background-color: transparent; border: none; color: #317194; } ul { background-color: transparent; list-style-type: none; margin-top: 0; opacity: 0; padding: 0; width: 50px; } ul li { align-items: center; display: flex; justify-content: center; } @keyframes jiggle { 0% { transform: scale(0.8, 0.8); } 30% { transform: scale(0.75, 1.15); } 50% { transform: scale(1.12, 0.75); } 60% { transform: scale(0.9, 1.12); } 70% { transform: scale(1.05, 0.95); } 80% { transform: scale(0.85, 1.05); } 90% { transform: scale(1.02, 0.98); } 95% { transform: s.........完整代码请登录后点击上方下载按钮下载查看
网友评论0