div+css实现联系人名片卡片堆叠翻转显示效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现联系人名片卡片堆叠翻转显示效果代码

代码标签: div css 联系人 名片 卡片 堆叠 翻转 显示

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

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

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

  
  
  
<style>
@import url("https://fonts.googleapis.com/css2?family=Comfortaa&family=Dancing+Script&display=swap");
body {
  overflow-x: hidden;
  color: #fff;
  margin: 0 auto;
}
body * {
  font-family: "Comfortaa", cursive;
}
body p, body h1, body h2, body h3, body h4, body h5, body h6 {
  margin: 0;
}
body a {
  color: #fff;
  text-decoration: none;
}
body ul, body li {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

.cardSection {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  background-blend-mode: soft-light;
  background-color: rgba(0, 0, 0, 0.9);
  overflow: hidden;
  transition: ease all 0.3s;
}
.cardSection.opacity {
  opacity: 0;
}
.cardSection .container {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  width: 90%;
  margin: 0 auto;
  height: 250px;
  position: relative;
  perspective: 1000px;
  transition: ease all 0.5s;
}
.cardSection .container.anim {
  opacity: 0;
}
.cardSection .container.anim .card {
  transform: rotateX(360deg);
}
.cardSection .container.anim .card.frontFace {
  opacity: 0;
}
.cardSection .container.movCards {
  height: 550px;
}
.cardSection .container.movCards .card .backCard {
  transition-delay: 0.5s;
}
.cardSection .container.movCards .card .backCard:nth-of-type(1) {
  transform: scale(0.99) translateX(12px) translateY(12px);
}
.cardSection .container.movCards .card .backCard:nth-of-type(2) {
  transform: scale(0.99) translateX(6px) translateY(6px);
}
.cardSection .container.movCards .card .backCard:nth-of-type(3) {
  transform: scale(0.99) translateX(0px) translateY(0px);
}
.cardSection .container .card {
  position: absolute;
  box-shadow: 0 0 1px 1px #000;
  transition: ease all 1s;
}
.cardSection .container .card .backCard {
  position: absolute;
  top: 0;
  left: 0;
  width: 450px;
  height: 250px;
  border-radius: 15px;
  background-color: #1b1b1b;
  transform-origin: bottom right;
  box-shadow: 0 0 1px 1px #000;
  transition: ease all 0.5s;
}
.cardSection .container .card.frontFace {
  top: 0;
  z-index: 1;
}
.cardSection .container .card.frontFace .backCard:after {
  box-shadow: 0 0 10px 0 #000;
}
.cardSection .container .card.frontFace .backCard:before, .cardSection .container .card.frontFace .backCard:after, .cardSection .container .card.frontFace .mainContent:before, .cardSection .container .card.frontFace .mainContent:after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 15px;
  background-color: #fff;
}
.cardSection .container .card.frontFace .backCard:before, .cardSection .container .card.frontFace .mainContent:before {
  top: 0;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}
.cardSection .container .card.frontFace .backCard:after, .cardSection .container .card.frontFace .mainContent:after {
  bottom: 0;
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 15px;
}
.cardSection .container .card.backFace {
  bottom: 0;
}
.cardSection .container .card.backFace .mainContent {
  justify-content: space-between;
}
.cardSection .container .card .mainContent {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  align-content: center;
  width: 450px;
  height: 250px;
  padding: 20px;
  border-radius: 15px;
  background-color: #1b1b1b;
  box-sizing: border-box;
  box-shadow: 0 0 1px 1px #000;
  position: relative;
}
.cardSection .container .card .mainContent .logo {
  text-align: center;
}
.cardSection .container .card .mainContent .logo .icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 10px auto;
}
.cardSection .container .card .mainContent .logo .companyName {
  letter-spacing: 10px;
  text-transform: uppercase;
}
.cardSection .container .card .mainContent .logo .companyName:after {
  content: attr(data-last-letter);
  letter-spacing: 0;
}
.cardSection .container .card .mainContent .logo .slogan {
  font-size: 14px;
  font-family: "Dancing Script", cursive;
}
.cardSection .con.........完整代码请登录后点击上方下载按钮下载查看

网友评论0