css+akar-icons实现垂直导航菜单工具条悬浮提示效果代码

代码语言:html

所属分类:菜单导航

代码描述:css+akar-icons实现垂直导航菜单工具条悬浮提示效果代码

代码标签: css akar-icons 垂直 导航 菜单 工具条 悬浮 提示

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/akar-icons.css">
<style>
    @import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap");
*, *:after, *:before {
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 5vh;
  padding-bottom: 5vh;
  background-color: #f2f5f7;
}

.iconnav{
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: auto;
  margin-right: auto;
  background-color: #05043e;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.75rem;
  border-radius: 10px;
  box-shadow: 0 10px 50px 0 rgba(5, 4, 62, 0.25);
}

.iconnav li:nth-child(6) {
  margin-top: 5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #363664;
}

.iconnav li + li {
  margin-top: 0.75rem;
}

.iconnav a {
  color: #FFF;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 8px;
  position: relative;
}
.iconnav a:hover, .iconnav a:focus, .iconnav a.active {
  background-color: #30305a;
  outline: 0;
}
.iconnav a:hover span, .iconnav a:focus span, .iconnav a.active span {
  transform: scale(1);
  opacity: 1;
}
.iconnav a i {
  font-size: 1.375rem;
}
.iconnav a span {
  position: absolute;
  background-color: #30305a;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  left: calc(100% + 1.5rem);
  transform-origin: center left;
  transform: scale(0);
  opacity: 0;
  transition: 0.........完整代码请登录后点击上方下载按钮下载查看

网友评论0