纯css布局实现花木兰持剑效果

代码语言:html

所属分类:布局界面

代码描述:纯css布局实现花木兰持剑效果

代码标签: 实现 花木兰 持剑 效果

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


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

<style>

.footer {
  bottom: 0;
  color: white;
  top: 35rem;
  font-size: 2rem;
}
.footer .title {
  font-family: 'Amatic SC';
}
.footer .sub {
  display: flex;
  justify-content: space-around;
  font-size: 1rem;
  font-family: 'Amatic SC';
}
.footer .sub a {
  color: #f1c3e1;
  text-decoration: none;
}
.footer .sub a:hover {
  color: white;
}

body {
  width: 99%;
  height: 36rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #222;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: auto;
  top: 0;
  bottom: 0;
  width: 32rem;
  background-color: #0f2112;
  border-radius: 32rem;
  overflow: hidden;
  transform: scale(0.7);
  height: 32rem;
  border: 5px solid white;
}

.background {
  position: absolute;
}
.background .soft_side {
  height: 32rem;
  width: 19rem;
  left: -18rem;
  position: absolute;
  top: -16rem;
  background-color: #f1c3e1;
}
.background .soft_side .cherry {
  position: relative;
  top: -50px;
  width: 100%;
  text-align: right;
}
.background .soft_side .cherry i {
  display: inline-block;
  width: 200px;
  height: 150px;
  background: linear-gradient(to bottom right, #309900, #005600);
  transform: skew(20deg);
  border-radius: 5% 40% 70%;
  box-shadow: inset 0px 0px 1px #222;
  border: 1px solid #333;
  z-index: 1;
  -webkit-animation: falling 5s 0s infinite;
}
.background .soft_side .cherry i:before {
  position: absolute;
  content: '';
  top: 117px;
  right: 9px;
  height: 27px;
  width: 32px;
  transform: rotate(49deg);
  border-radius: 0% 15% 15% 0%;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
  border-left: 0px solid #222;
  border-right: 1px solid #222;
  background: linear-gradient(to right, #e298d2, #e3aceb);
  z-index: 1;
}
.background .soft_side .cherry i:after {
  content: '';
  height: 125px;
  width: 10px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0));
  display: block;
  transform: rotate(125deg);
  position: absolute;
  left: 85px;
  border-radius: 50%;
}
.background .soft_side .cherry i:nth-of-type(n) {
  height: 23px;
  width: 30px;
  -webkit-animation-delay: 1.9s;
  -webkit-animation-timing-function: ease-in-out;
  background: linear-gradient(to bottom right, #d592db, #e727ce);
  opacity: .7;
  transform: rotate(180deg);
}
.background .soft_side .cherry i:nth-of-type(n):before {
  width: 7px;
  height: 5px;
  top: 17px;
  right: 1px;
}
.background .soft_side .cherry i:nth-of-type(n):after {
  width: 2px;
  height: 17px;
  left: 12px;
  top: 0px;
}
.background .soft_side .cherry i:nth-of-type(2n+1) {
  height: 11px;
  width: 16px;
}
.background .soft_side .cherry i:nth-of-type(2n+1) :before {
  width: 4px;
  height: 3px;
  top: 7px;
  right: 0px;
}
.background .soft_side .cherry i:nth-of-type(2n+1) :after {
  width: 2px;
  height: 6px;
  left: 5px;
  top: 1px;
}
.background .soft_side .cherry i:nth-of-type(3n+2) {
  height: 17px;
  width: 23px;
  opacity: .3;
}
.background .soft_side .cherry i:nth-of-type(3n+2):before {
  height: 4px;
  width: 4px;
  top: 12px;
  right: 1px;
}
.background .soft_side .cherry i:nth-of-type(3n+2):after {
  height: 10px;
  width: 2px;
  top: 1px;
  left: 8px;
}
.background .soft_side .cherry i:nth-of-type(2n) {
  -webkit-animation-delay: 3.9s;
  -webkit-animation: falling2 5s 0s infinite;
}
.background .soft_side .cherry i:nth-of-type(3n) {
  -webkit-animation-delay: 2.3s;
  -webkit-animation: falling3 5s 0s infinite;
}
.background .soft_side .cherry i:nth-of-type(4n) {
  -webkit-animation-delay: 4.4s;
}
.background .soft_side .cherry i:nth-of-type(5n) {
  -webkit-animation-delay: 5s;
}
.background .soft_side .cherry i:nth-of-type(6n) {
  -webkit-animation-delay: 3.5s;
}
.background .soft_side .cherry i:nth-of-type(7n) {
  -webkit-animation-delay: 2.8s;
}
.background .soft_side .cherry i:nth-of-type(8n) {
  -webkit-animation-delay: 1.5s;
}
.background .soft_side .cherry i:nth-of-type(9n) {
  -webkit-animation-delay: 3.3s;
}
.background .soft_side .cherry i:nth-of-type(10n) {
  -webkit-animation-delay: 2.5s;
}
.background .soft_side .cherry i:nth-of-type(11n) {
  -webkit-animation-delay: 1.2s;
}
.background .soft_side .cherry i:nth-of-type(12n) {
  -webkit-animation-delay: 4.1s;
}
.background .soft_side .cherry i:nth-of-type(13n) {
  -webkit-animation-delay: 1s;
}
.background .soft_side .cherry i:nth-of-type(14n) {
  -webkit-animation-delay: 4.7s;
}
.background .soft_side .cherry i:nth-of-type(15n) {
  -webkit-animation-delay: 3s;
}
.background .soft_side .cherr.........完整代码请登录后点击上方下载按钮下载查看

网友评论0