css圣诞老人窗外送礼物动画效果代码

代码语言:html

所属分类:动画

代码描述:css圣诞老人窗外送礼物动画效果代码

代码标签: 礼物 动画 效果

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

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
    @charset "utf-8";
@import url("https://fonts.googleapis.com/css?family=Mountains+of+Christmas:700");
body, html {
  height: 100%;
}

body {
  background: #e9e0ca;
}

.holidays-title {
  font-family: "Mountains of Christmas", cursive;
  font-size: 3em;
  background: #fff;
  padding: 20px;
  border-radius: 20px;
  box-shadow: 2px 2px 1px 1px rgba(0, 0, 0, 0.14);
  position: relative;
  opacity: 0;
  animation: balloon 6s ease-in-out infinite;
}
.holidays-title::before {
  position: absolute;
  content: "";
  width: 0;
  height: 0;
  border-left: 30px solid transparent;
  border-right: 0 solid transparent;
  border-top: 40px solid #fff;
  bottom: -31px;
  right: 33px;
  transform: rotateZ(-20deg);
}

.wrapper {
  margin: 0;
  display: flex;
  height: inherit;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.sc-hat, .sc-head .ears, .sc-head .beard::before, .sc-head .nose, .room-window::after, .room-window::before, .tree-jar, .tree-stalk {
  display: table;
  margin: 0 auto;
}

.tie-wrap::after, .tie-wrap::before {
  position: absolute;
  content: "";
  width: 0;
  height: 0;
  border-left: 17px solid transparent;
  border-right: 0 solid transparent;
  border-bottom: 40px solid yellow;
  left: 21px;
  top: 5px;
}

.ground {
  background: rgba(0, 0, 0, 0.12);
  width: calc(100vw - 20%);
  height: 70px;
  border-radius: 50%;
  display: table;
}

.scene {
  max-width: calc(100vw - 30%);
  min-width: 640px;
  position: relative;
}

.xmas-tree {
  position: relative;
  top: 80px;
  float: left;
}

.tree-star {
  position: absolute;
  top: 0;
  left: 40%;
  z-index: 4;
}
.tree-star::before {
  content: "";
  position: absolute;
  bottom: -16px;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-bottom: 25px solid #fcd000;
  box-shadow: 1px 19px 20px -7px #1d5022;
}
.tree-star::after {
  content: "";
  position: absolute;
  top: 0;
  width: 0;
  height: 0;
  border-left: 15px solid transparent;
  border-right: 15px solid transparent;
  border-top: 25px solid #fcd000;
}

.tree-part {
  width: 0;
  height: 0;
  border-left: 80px solid transparent;
  border-right: 80px solid transparent;
  border-bottom: 100px solid #49bd55;
  position: relative;
  z-index: 3;
}
.tree-part::before {
  content: "";
  position: absolute;
  width: 160px;
  background-repeat: repeat;
  height: 15px;
  background-size: 20px 20px;
  background-image: radial-gradient(circle at 10px 15px, #3fae4a 12px, transparent 13px);
  top: 99px;
  left: -80px;
  transform: rotateX(180deg);
}
.tree-part:nth-child(2) {
  border-bottom-color: #31883a;
  transform: scale(1.4);
  top: -45px;
  z-index: 2;
}
.tree-part:nth-child(2)::before {
  background-image: radial-gradient(circle at 10px 15px, #389b42 12px, transparent 13px);
}
.tree-part:nth-child(3) {
  border-bottom-color: #2b7532;
  transform: scale(1.8);
  top: -80px;
  z-index: 1;
}
.tree-part:nth-child(3)::before {
  background-image: radial-gradient(circle at 10px 15px, #31883a 12px, transparent 13px);
}

.tree-stalk {
  width: 25px;
  height: 75px;
  background: #7b652d;
  box-shadow: inset 0 22px 6px -1px #302812;
  position: relative;
  top: -40px;
}

.tree-jar {
  width: 80px;
  position: relative;
  top: -40px;
  left: 2px;
}
.tree-jar::.........完整代码请登录后点击上方下载按钮下载查看

网友评论0