炫酷全屏菜单导航效果

代码语言:html

所属分类:菜单导航

代码描述:炫酷全屏菜单导航效果

代码标签: 导航 效果

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="http://repo.bfw.wiki/bfwrepo/css/all.min.css">
<link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Montserrat:400,700'>
<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 300vh;
  background-image: linear-gradient(to top, #09203f 0%, #537895 100%);
}

header {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
header h1, header button {
  position: relative;
  z-index: 10;
}
header h1 {
  text-transform: uppercase;
  letter-spacing: 1pt;
  font-size: 3em;
  color: #fff;
  font-family: 'Montserrat', sans-serif;
}
header button {
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  position: absolute;
  bottom: 100px;
  left: calc(50% - 60px);
  width: 120px;
  height: 50px;
  border: 0;
  box-shadow: 2px 1px 20px 0 rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  font-size: 1em;
  color: #09203f;
  transition: all 0.8s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.3s cubic-bezier(0.455, 0.03, 0.515, 0.955), box-shadow 0.3s cubic-bezier(0.455, 0.03, 0.515, 0.955);
  overflow: hidden;
}
header button:hover {
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.5);
}
header button:focus {
  outline: 0;
}
header button:before, header button:after {
  font-family: "Font Awesome 5 Free";
  transition: all 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
  top: 17px;
  position: absolute;
}
header button:before {
  content: "\f067";
  opacity: 1;
  left: 53px;
}
header button:after {
  content: "\f0c9";
  opacity: 0;
  left: 0;
}
header .triangle {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, #09203f 0%, #537895 100%);
  transition: all 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}
header .triangle.left {
  clip-path: polygon(0 0, 0% 100%, 100% 100%);
}
header .triangle.right {
  clip-path: polygon(100% 0, 0 0, 100% 100%);
}
header.open .triangle.left {
  clip-path: polygon(0 0, 0 100%, 0 100%);
}
header.open .triangle.right {
  clip-path: polygon(100% 0, 100% 0, 100% 100%);
}
header.open button {
  left: 40px;
  bottom: 40px;
  width: 50px;
  border-radius: 50%;
}
header.open button:before {
  opacity: 0;
  left: 100%;
}
header.open button:after {
  opacity: 1;
  left: 18px;
}
header.open button.menu {
  width: 100%;
  height: 100%;
  bottom: 0;
  left: 0;
  border-radius: 0;
}
header.open button.menu:after {
  left: -100%;
}

content section {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1em;
  letter-spacing: 2pt;
  color: #fff;
}

nav {
  pos.........完整代码请登录后点击上方下载按钮下载查看

网友评论0