tabbar导航按钮效果

代码语言:html

所属分类:菜单导航

代码描述:tabbar导航按钮效果

代码标签: 效果

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
:root {
  --background: #cecece;
  --scale: 1;
  --icon-size: 24px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--background);
  overflow: hidden;
}

nav {
  position: relative;
  min-width: 350px;
  min-height: 80px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-radius: 10px;
  padding: 0 15px;
  background: black;
  box-shadow: 0 6.7px 5.3px rgba(0, 0, 0, 0.12), 0 22.3px 17.9px rgba(0, 0, 0, 0.08), 0 100px 80px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
nav ul {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
nav ul li {
  list-style: none;
  width: var(--icon-size);
  height: var(--icon-size);
}
nav ul li a {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
nav ul li a svg {
  fill: #fff;
  width: 100%;
  height: 100%;
  opacity: 0.4;
  transition: opacity 100ms ease;
  pointer-events: none;
}
nav ul li a.active svg {
  opacity: 1;
}
nav .tubelight {
  position: absolute;
  left: 0px;
  top: 0px;
  transform: translateX(-50%);
  width: 45px;
  height: 5px;
  border-radius: 5px;
  background: #ffffff;
  transition: left 400m.........完整代码请登录后点击上方下载按钮下载查看

网友评论0