炫酷导航条特效

代码语言:html

所属分类:菜单导航

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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Karlo Videk</title>

<style>
      @import url("https://fonts.googleapis.com/css?family=Raleway");
body {
  font-family: "Raleway", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1em;
  background-color: #0d0d0d;
  color: #ffffff;
  overflow: hidden;
}

.u-b6 {
  font-family: "Raleway", sans-serif;
  margin: 0;
  font-size: 10px;
}

.u-b4 {
  font-family: "Raleway", sans-serif;
  margin: 0;
  font-size: 14px;
}

.u-a6 {
  margin: 0;
  margin-bottom: 0.6em;
  font-size: 54px;
}

.u-a7 {
  margin: 0;
  font-size: 64px;
  padding: 60px 60px 0 60px;
}

.c-work {
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.c-work__list {
  position: relative;
  z-index: 2;
  margin: 0 auto;
  text-align: center;
}
.c-work__item {
  display: block;
}

.c-work-item {
  position: relative;
  display: block;
  cursor: pointer;
  padding: 25px 0;
}
.c-work-item__number {
  position: absolute;
  display: inline-block;
  right: 100%;
  top: 25px;
  margin-right: 25px;
  pointer-events: none;
  transition: all 0.2s 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform, opacity;
}
.c-work-item__title {
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.c-work-item__category {
  display: inline-block;
  transition: all 0.2s 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}
.c-work-item__category i {
  font-style: normal;
  display: inline-block;
  margin-right: 8px;
}
.c-work-item:hover .c-work-item__title {
  transform: translateX(10px);
}
.c-work-item:hover .c-work-item__number {
  opacity: 0;
  transform: translateX(20px);
}
.c-work-item:hover .c-work-item__category {
  transform: translateX(10px);
}

.c-work-preview {
  position: fixed;
  width: 100%;
  height: 100vh;
  top: 0;
  right: 0;
  padding-right: 60px;
  pointer-events: none;
  z-index: 1;
}
.c-work-preview:after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0d0d0d;
  opacity: 0.5;
}
.c-work-preview__canvas {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 140%;
  height: 140%;
}
.c-work-preview__canvas .canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  width: auto;
  height: auto;
  min-width: 100%;
  min-height: 100%;
  background-size: 0;
  transform: translate(-50%, -50%);
}
.c-work-preview__canvas canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.c-work-preview__list {
  display: block;
  position: absolute;
  top: 0;
  right: 60px;
  width: 41.6666666667%;
  height: 100%;
}
.c-work-preview__item {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  left: 0;
  height: 0;
  padding-bottom: 56.25%;
  overflow: hidden;
}
.c-work-preview__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
}

    </style>

</head>
<body translate="no">
<div class="c-work">
<ul class="c-work__list js-work">

<li class="c-work__item">
<div class="c-work-item js-work-item" data-work-preview-id="0">
<span class="c-work-item__number u-b6">
01
 </span>
<div class="c-work-item__title">
<h3 class="u-a6">
技术博客
</h3>
</div>
<span class="c-work-item__category u-b4">
<i>/</i>Website
</span>
</div>
</li>


<li class="c-work__item">
<div class="c-work-item js-work-item" data-work-preview-id="1">
<span class="c-work-item__number u-b6">
02
</span>
<div class="c-work-item__title">
<h3 class="u-a6">
技术创业
</h3>
</div>
<span class="c-work-item__category u-b4">
<i>/</i>Digital Presentation
</span>
</div>
</li>


<li class="c-work__item">
<div class="c-work-item js-work-item" data-work-preview-id="2">
<span class="c-work-item__number u-b6">
03
</span>
<div class="c-work-item__title">
<h3 class="u-a6">
关于我们
</h3>
</div>
<span class="c-work-item__category u-b4">
<i>/</i>Website
</span>
</div>
</li>




</ul>
<div class="c-work-preview">
<div class="c-work-preview__canvas js-work-preview-list">
<div class="canvas js-work-preview-canvas" data-displacement-map="/bfwrepo/image/7.jpg" style="background-image: url(/bfwrepo/image/7.jpg);"></div>
</div>
<ul class="c-work-preview__list js-work-preview-list">

<li class="c-work-preview__item">
<i class="c-work-preview__image js-work-preview" data-work-preview="/bfwrepo/image/work-2.jpg" style="background-image: url(/bfwrepo/image/work-2.jpg);"></i>
</li>


<li class="c-work-preview__item">
<i class="c-work-preview__image js-work-preview" data-work-preview="/bfwrepo/image/work-3.jpg" style="background-image: url(/bfwrepo/image/work-3.jpg);"></i>
</li>


<li class="c-work-preview__item">
<i class="c-work-preview__image js-work-preview" data-work-preview="/bfwrepo/image/work-4.jpg" style="background-image: url(/bfwrepo/image/work-4.jpg);"></i>
</li>





</ul>
</div>
</div>

<script src='http://repo.bfw.wiki/bfwrepo/js/jquery-3.3.1.js'></script>
<script src='.........完整代码请登录后点击上方下载按钮下载查看

网友评论0