div+css实现悬浮图标菜单点击弹出子菜单效果代码
代码语言:html
所属分类:菜单导航
代码描述:div+css实现悬浮图标菜单点击弹出子菜单效果代码
代码标签: div css 悬浮 图标 菜单 点击 弹出 子菜单
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@700&display=swap" rel="stylesheet"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.1.2.css"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { overflow: hidden; font-family: "Roboto Condensed", sans-serif; } .main-container { height: 100vh; background: #fee715; display: flex; align-items: center; justify-content: center; } .expandable-button { position: relative; width: 8em; height: 8em; border: 1px solid #101820; border-radius: 50%; background: #101820; transition: 0.15s ease-out; cursor: pointer; box-shadow: 0 10px 50px 5px #10182022; } .expandable-button .close-icon { position: relative; height: 100%; width: 100%; color: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 2em; } .expandable-button .close-icon .fas { position: absolute; top: 100%; transition: 0.15s; } .expandable-button:hover { box-shadow: 0 15px 100px 10px #10182022; } .expandable-button .expansion-item { position: absolute; top: 50%; left: 50%; height: 1em; width: 1em; background: #fff; border-radius: 50%; pointer-events: none; text-decoration: none; color: #101820; transition: 0.25s; box-shadow: 0 5px 80px 5px #10182044; } .expandable-button .expansion-item .expansion-content { display: none; transition: 0.15s; animation: fadeOut 0.5s linear forwards; } .expandable-button .expansion-item:nth-of-type(1) { transform: translateX(calc(-60% + -25px)) translateY(-50%); } .expandable-button .expansion-item:nth-of-type(2) { transform: translateX(calc(-57% + 0px)) translateY(-50%); } .expandable-button .expansion-item:nth-of-type(3) { transform: translateX(calc(-54% + 25px)) translateY(-50%); } .expandable-button.expanded { width: 5em; height: 5em; } .expandable-button.expanded:hover { box-shadow: 0 10px 50px 5px #10182022; } .expandable-button.expanded .close-icon .fas { top: 50%; transform: translateY(-50%); transition-delay: 0.25s; } .expandable-button.expanded .expansion-item { width: 7em; height: 2em; border-radius: 5em; top: -50%; pointer-events: fill; transform: translateX(-0.7em); } .expandable-button.expanded .expansion-item:hover { top: -60%; } .expandable.........完整代码请登录后点击上方下载按钮下载查看
网友评论0