div+css实现伸缩菜单导航条效果代码
代码语言:html
所属分类:菜单导航
代码描述:div+css实现伸缩菜单导航条效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.5.15.3.css"> </head> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #6843cf; font-family: consolas; } .container { position: relative; } .container .navigation { position: relative; width: 240px; height: 360px; background: #fff; border-radius: 10px; overflow: hidden; transition: 0.5s; } .container .navigation.active { width: 80px; } .container .navigation ul { position: absolute; top: 0; left: 0; width: 100%; } .container .navigation ul li { position: relative; list-style: none; width: 100%; } .container .navigation ul li:hover { background: #efefef; } .container .navigation ul li a { position: relative; display: block; width: 100%; display: flex; text-decoration: none; color: #6843cf; font-weight: 600; } .container .navigation ul li a .icon { position: relative; display: block; min-width: 80px; height: 60px; line-height: 70px; text-align: center; } .container .navigation ul li a .icon i { font-size: 24px; } .container .navigation ul li a .title { position: relative; .........完整代码请登录后点击上方下载按钮下载查看
网友评论0