css实现紫色大气手机端部导航条效果代码

代码语言:html

所属分类:菜单导航

代码描述:css实现紫色大气手机端部导航条效果代码

代码标签: css 紫色 手机 导航条

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


<!DOCTYPE html>
<html lang="en" >

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
:root {
  --black: #121212;
  --accent: #db74ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

body {
  background-color: #212121;
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

nav {
  position: relative;
  height: 100px;
  width: 400px;
  /* padding: 0px 10px; */
  background-color: var(--black);
  border-radius: 8px;
}

.border-effect {
  position: absolute;
  width: 40px;
  left: 30px;
  height: 10px;
  background-color: var(--accent);
  border-radius: 0px 0px 18px 18px;
  filter: drop-shadow(0px 5px 5px var(--accent));
  transition: all 0.7s;
}

ul {
  display: flex;
  justify-content: space-between;
  height: 100%;
  padding: 0;
}

li {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-content: space-between;
  align-items: center;
  font-size: 14px;
  font-family: "Nunito Sans", sans-serif;
  list-style: none;
  padding-bottom: 10px;
  color: #40464e;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
  transition: color 1.5s;
}

.active {
  color: var(--accent);
}

svg {
  width: 40px;
  height: 40px;
  margin: 10px 0px;
  fill: var(--black);
  tran.........完整代码请登录后点击上方下载按钮下载查看

网友评论0