视频动态背景滑雪网站首页设计效果代码

代码语言:html

所属分类:布局界面

代码描述:视频动态背景滑雪网站首页设计效果代码

代码标签: 滑雪 网站首页 设计 效果

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


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

<head>

  <meta charset="UTF-8">
  

  
<style>
@import url("https://fonts.googleapis.com/css2?family=Nunito&family=Roboto+Slab:wght@900&display=swap");

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

body {
  height: 100vh;
  display: grid;
  place-items: center;
  font-family: "Nunito", sans-serif;

  --primary: #2c2c2c;
  --blue: #14b0ee;
}

h1 {
  font-family: "Roboto Slab", serif;
  color: var(--primary);
}

ul {
  list-style: none;
}

#videoBkg {
  position: fixed;
  z-index: -1;
}

.hero-section {
  position: absolute;
  top: 30%;
  left: 12%;
  transform: translateY(-30%);
  z-index: 10;
}
.hero-section > * {
  transform: translateY(80px);
  opacity: 0;
  animation: fadeUp 1s ease-out forwards;
}
.hero-section h1 {
  font-size: 5rem;
}
.hero-section p {
  font-size: 1.2rem;
  margin: 4em 0 2em 0;
  line-height: 30px;
}
.hero-section p strong {
  color: var(--blue);
}
.hero-section button {
  border: 2px solid var(--primary);
  padding: 1em 1.2em;
  outline: none;
  background-color: transparent;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background-color 0.3s;
}
.hero-section button:hover {
  background-color: var(--blue);
  color: #ffffff;
  border: 2px solid var(--blue);
}

.hero-section h1:nth-child(2) {
  animation-delay: 0.2s;
}
.hero-section h1:nth-child(3) {
  animation-delay: 0.5s;
}
.hero-section h1:nth-child(4) {
  animation-delay: 0.8s;
}
.hero-section p {
  animation-delay: 1s;
}
.hero-section button {
  animation-delay: 1.2s;
}

.menu-section {
  position: fixed;
  width: 34%;
  top: 5%;
  right: 12%;
  transform: translateY(-30%);
  z-index: 20;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0