css布局压缩机动画效果

代码语言:html

所属分类:布局界面

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


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">

<style>
.pos-r {
  position: relative;
}
.fw {
  width: 100%;
}
.before-after-handler {
  content: "";
  position: absolute;
}
/* RESETS & DEFAULTS  */
*,
*:before,
*:after {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  background-color: #333333;
  height: 100vh;
  font-family: 'Arial';
}
a {
  text-decoration: none;
  color: rgba(156, 156, 247, 0.6);
}
.compressor {
  margin: 32px auto;
  width: 230px;
  position: relative;
}
.compressor:before,
.compressor:after {
  content: "";
  display: table;
}
.compressor:after {
  clear: both;
}
.compressor .holder {
  float: left;
  width: 100%;
  height: 32px;
  background-color: #cccccc;
  border: 4px solid #000000;
  position: relative;
}
.compressor .holder:before,
.compressor .holder:after {
  content: "";
  position: absolute;
  bottom: -4px;
}
.compressor .holder:before {
  left: 12px;
  width: 100px;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: 16px solid #000000;
}
.compressor .holder:after {
  left: 18px;
  width: 88px;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid #333333;
}
.compressor .holder.flip-up {
  transform: rotate(180deg) scaleX(-1);
  z-index: -1;
}
.thread-wrapper {
  width: 100%;
  animation: crush 3s infinite 0s linear;
}
.thread-wrapper:before,
.thread-wrapper:after {
  content: "";
  display: table;
}
.thread-wrapper:after {
  clear: both;
}
.thread-wrapper .rod {
  float: right;
  margin-right: 16px;
  width: 30px;
  height: 212px;
  border: 4px solid #000000;
  border-top: 0;
  background-image: repeating-linear-gradient(-45deg, #cccccc, #cccccc 5px, #000000 5px, #000000 10px);
}
.thread-wrapper .paper {
  float: left;
  width: 88px;
  height: 100px;
  line-height: 92px;
  background-color: #ffffff;
  margin-left: 22px;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  color: #000000;
  position: relative;
  animation: paper-scale 3s infinite 0s linear;
  z-index: 1;
  box-shadow: 0 0 0 3px #000000;
}
.thread-wrapper .paper:after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background-color: #9c9cf7;
}
.thread-wrapper .paper .curl {
  position: absolute;
  display: block;
  width: 12px;
  height: 12px;
  right: -4px;
  top: -4px;
  z-index: 3;
}
.thread-wrapper .paper .curl:before,
.thread-wrapper .paper .curl:after {
  content: ".........完整代码请登录后点击上方下载按钮下载查看

网友评论0