js+css实现新年悬浮三维立体视觉卡片交互效果代码

代码语言:html

所属分类:视觉差异

代码描述:js+css实现新年悬浮三维立体视觉卡片交互效果代码

代码标签: 悬浮 三维 立体 视觉 卡片 交互 效果

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


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

<head>

  <meta charset="UTF-8">


  <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Oswald:300,400,700|Orbitron|Roboto+Condensed:300,400,700'>
  
<style>
* {
  box-sizing: border-box;
}

body {
  background-color: #fee1e1;
}

.wrapper {
  position: absolute;
  margin: -171px 0 0 -327.5px;
  left: 50%;
  top: 50%;
  height: 342px;
  width: 655px;
}

.card {
  background-image: url(//repo.bfw.wiki/bfwrepo/image/5fde903bae095.png);
  background-size: cover;
  width: 655px;
  height: 342px;
  border-radius: 5px;
  position: absolute;
  box-shadow: -20px 30px 116px 0 rgba(92, 15, 15, 0.54);
  overflow: hidden;
  z-index: 4;
}
.card__orangeShine, .card__greenShine {
  position: absolute;
  background-repeat: no-repeat;
  background-size: cover;
}
.card__orangeShine {
  background-image: url(//repo.bfw.wiki/bfwrepo/image/5fde90743ae55.png);
  right: -150px;
  top: -90px;
  bottom: 50px;
  z-index: 2;
  width: 570px;
  height: 500px;
}
.card__greenShine {
  background-image: url(//repo.bfw.wiki/bfwrepo/image/5fde909781e25.png);
  left: 20%;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 400px;
}
.card__year {
  font-family: 'Oswald', sans-serif;
  text-align: center;
  color: #fff;
  font-size: 110px;
  line-height: 110px;
  padding: 55px 0;
  font-weight: 100;
  position: relative;
  z-index: 2;
}
.card__thankyou {
  font-family: 'Oswald', sans-serif;
  position: absolute;
  text-transform: uppercase;
  font-weight: 100;
  left: 33%;
  bottom: 20%;
  z-index: 2;
  color: #fff;
  letter-spacing: 5px;
  line-height: 17px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}
.card__circle, .card__smallCircle {
  position: absolute;
  border-radius: 100%;
  background-image: linear-gradient(-239deg, #3B4576 0%, #242A48 59%);
  box-shadow: -10px -15px 90px 0 #191C41;
  z-index: 2;
}
.card__circle {
  right: 68px;
  bottom: 34px;
  width: 230px;
  height: 230px;
}
.card__smallCircle {
  right: 40%;
  top: -7%;
  width: 50px;
  height: 50px;
}
.card__outer-year {
  font-family: 'Orbitron';
}
.card__outer-year span {
  position: absolute;
  color: #fff;
  font-size: 16px;
  z-index: 4;
}
.card__outer-year span:nth-child(1):after, .card__outer-year span:nth-child(4):after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  border-bottom: 2px solid #fff;
}
.card__outer-year span:nth-child(1) {
  top: 35px;
  left: 35px;
}
.card__outer-year span:nth-child(2) {
  left: none;
  top: 35px;
  right: 35px;
}
.card__outer-year span:nth-child(3) {
  top: none;
  bottom: 35px;
  left: 35px;
}
.card__outer-year span:nth-child(4) {
  top: none;
  left: none;
  right: 35px;
  bottom: 35px;
}
.card__comet {
  position: relative;
  width: 8px;
  height: 8px;
  background-color: #fff;
  border-radius: 100%;
}
.card__cometOuter {
  position: absolute;
  top: 30%;
  left: 25%;
}
.card__comet--second {
  right: -30px;
  top: -15px;
  -webkit-transform: scale(0.6);
          transform: scale(0.6);
}
.card__comet:before, .card__comet:after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  background: -webkit-gradient(linear, left top, left bottom, from(.........完整代码请登录后点击上方下载按钮下载查看

网友评论0