jquery实现立体质感翻转翻牌时钟时间效果代码

代码语言:html

所属分类:其他

代码描述:jquery实现立体质感翻转翻牌时钟时间效果代码

代码标签: jquery 立体 质感 翻转 翻牌 时钟 时间

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

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

<head>

  <meta charset="UTF-8">
  

<style>
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@800&display=swap");
html,
body {
  height: 100%;
}

* {
  box-sizing: border-box;
}

:root {
  --flip-height: 100px;
  --flip-width: calc(var(--flip-height) * 0.6);
  --line-height: calc(var(--flip-height) * 0.5);
  --flip-container-color: #171717;
  --flip-color: #171717;
  --flip-text-color: #efefef;
  --flip-border-radius: calc(var(--flip-height) * 0.05);
  --animation-time: 0.8s;
  --animation-ease: linear;
  --perspective: 200px;
}

body {
  font-family: "Inter", sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  
}

.flip {
  height: var(--flip-height);
  width: var(--flip-width);
  border-radius: 4px;
  font-size: calc(var(--flip-height) * 0.5);
  font-weight: 700;
  position: relative;
  margin: 0.1rem;
}
.flip .flip-display {
  height: var(--flip-height);
  width: var(--flip-width);
  display: flex;
  flex-direction: column;
  z-index: 1;
}
.flip .flip-display .flip-display-top,
.flip .flip-display .flip-display-bottom {
  position: relative;
  text-align: center;
  overflow: hidden;
  width: 100%;
  height: calc(var(--flip-height) * 0.5);
  color: var(--flip-text-color);
  background-color: var(--flip-container-color);
  line-height: calc(var(--line-height) * var(--i));
}
.flip .flip-display .flip-display-top {
  --i: 2;
  border-top-left-radius: var(--flip-border-radius);
  border-top-right-radius: var(--flip-border-radius);
}
.flip .flip-display .flip-display-bottom {
  --i: -2;
  border-bottom-left-radius: var(--flip-border-radius);
  border-bottom-right-radius: var(--flip-border-radius);
}
.flip .flipper {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  height: var(--flip-height);
  width: calc(var(--flip-width) * 1);
  perspective: 200px;
}
.flip .flipper .flipper-top,
.flip .flipper .flipper-bottom {
  position: absolute;
  left: -10%;
  right: -10%;
  width: calc(var(--flip-width));
  margin: auto;
  text-align: center;
  height: calc(var(--flip-height) * 0.5);
  line-height: calc(var(--line-height).........完整代码请登录后点击上方下载按钮下载查看

网友评论0