css实现三维多层视觉差异电影海报效果代码

代码语言:html

所属分类:视觉差异

代码描述:css实现三维多层视觉差异电影海报效果代码

代码标签: css 三维 多层 视觉差异 电影 海报

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

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

<head>
  <meta charset="UTF-8">
  

  
  
<style>
@font-face {
  font-family: "Agency FB Black";
  src: url("//repo.bfw.wiki/bfwrepo/font/AgencyFBBlack.woff2") format("woff2"), url("h//repo.bfw.wiki/bfwrepo/font/AgencyFBBlack.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Agency FB Regular";
  src: url("//repo.bfw.wiki/bfwrepo/font/AgencyFB-Reg.woff2") format("woff2"), url("//repo.bfw.wiki/bfwrepo/font/AgencyFB-Reg.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Agency FB Bold";
  src: url("//repo.bfw.wiki/bfwrepo/font/AgencyFB-Bold.woff2") format("woff2"), url("//repo.bfw.wiki/bfwrepo/font/AgencyFB-Bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}
html,
body {
  font-family: "Agency FB Regular", sans-serif;
  margin: 0;
  padding: 0;
  background: black;
  scrollbar-color: #ffcd1c black;
  min-height: 130vh;
}

/* @media (min-width: 960px) {
    main {
        scale: 0.9
    }
} */
@media (orientation: landscape) {
  main {
    scale: 0.9;
  }
}
@keyframes move {
  0% {
    transform: rotateY(-20deg) rotateX(-5deg);
  }
  25% {
    transform: rotateY(20deg) rotateX(-5deg);
  }
  50% {
    transform: rotateY(20deg) rotateX(5deg);
  }
  75% {
    transform: rotateY(-20deg) rotateX(5deg);
  }
  100% {
    transform: rotateY(-20deg) rotateX(-5deg);
  }
}
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  perspective: 1000px;
}

#furiosa_poster {
  aspect-ratio: 9/14;
  background: center/cover no-repeat url("//repo.bfw.wiki/bfwrepo/images/movie/furiosa_back.webp");
  width: 100%;
  max-width: 70vmin;
  position: relative;
  animation: move 10s 0s infinite;
  transform-style: preserve-3d;
  border-radius: 6vmin;
}

#furiosa_poster__header {
  position: absolute;
  top: 30%;
  left: 0;
  width: 100%;
  text-align: center;
  display: flex;
  justify-content: center;
  transform: translateZ(10vmin);
  transform-style: preserve-3d;
}

#furiosa_poster__header__title {
  font-family: "Agency FB Black";
  font-size: 22vmin;
  position: absolute;
  margin: 0;
  line-height: 1em;
  white-space: nowrap;
  background-image: url("//repo.bfw.wiki/bfwrepo/images/movie/rust.jpg");
  background-size: cover;
  background-position: center;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
}

#furiosa_poster__header__title::before {
  content: attr(data-title);
  position: absolute;
  color: #ffc61c5e;
  -webkit-text-fill-color: initial;
  mix-blend-mode: overlay;
  opacity: 1;
  text-shadow: 0px 0px 4vmin rgba(0, 0, 0, 0.4), 1px 1px #bf4528;
}

#furiosa_poster__front_image {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  transform: translateZ(20vmin);
  transform-style: preserve-3d;
  filter: drop-shadow(0px 0px 40px rgba(0, 0, 0, 0.4));
  border-radius: 6vmin;
}

#furiosa_poster__anya {
  font-family: "Agency FB Black";
  font-size: 2.6vmin;
  letter-spacing: 0.1em;
  te.........完整代码请登录后点击上方下载按钮下载查看

网友评论0