div+css实现垂直q弹图标菜单悬浮展开效果代码
代码语言:html
所属分类:菜单导航
代码描述:div+css实现垂直q弹图标菜单悬浮展开效果代码
代码标签: div css 垂直 q弹 图标 菜单 悬浮 展开
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/font-awesome-4.7.0/css/font-awesome.min.css"> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { height: 100vh; background-color: #fff; display: flex; justify-content: center; align-items: center; } .iconfont { font-size: 26px !important; color: #fff; line-height: 50px; text-align: center; } .menu-box { width: 60px; height: 400px; background-color: #22243a; border-radius: 30px; box-shadow: 1px 1px 2px rgba(0, 0, 0, .3); /* 添加过渡 */ transition: all .2s ease-out; overflow: hidden; } .menu-box:hover { width: 120px; border-radius: 60px; } /* hover时让文字出现 */ .menu-box:hover>ul>li p { display: block; } /* 表情盒子 */ .emotion-box { width: 100%; text-align: center; margin: 10px auto; } #emotion1, #emotion2 { color: #fff; font-size: 32px !important; animation: jitter .3s linear forwards; } #emotion2 { display: none; } .menu-box:hover #emotion1 { display: none; } .menu-box:hover #emotion2 { display: .........完整代码请登录后点击上方下载按钮下载查看
网友评论0