css实现土星先生动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现土星先生动画效果代码,鼠标点击它试试。

代码标签: css 土星 先生 动画

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


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

<head>

  <meta charset="UTF-8">
  

  
  
  
<style>
html {
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
}

.background {
  align-items: center;
  display: flex;
  justify-content: center;
  height: 100%;
  background-color: rgb(200, 255, 227);
  opacity: 0.8;
  background-image: linear-gradient(135deg, rgb(0 183 107) 25%, transparent 25%),
    linear-gradient(225deg, rgb(0 183 107) 25%, transparent 25%),
    linear-gradient(45deg, rgb(0 183 107) 25%, transparent 25%),
    linear-gradient(315deg, rgb(0 183 107) 25%, rgb(91 255 202) 25%);
  background-position: 29px 0px, 29px 0px, 0px 0px, 0px 0px;
  background-size: 60px 60px;
  background-repeat: repeat;
  box-shadow: rgb(255 247 0 / 62%) 0px -400px 120px -80px inset;
}

.boing {
  display: flex;
  justify-content: center;
  position: relative;
}

.hair {
  position: absolute;
  width: 400px;
}

#bow {
  position: absolute;
  width: 400px;
  transform-origin: 209px 68px;
}

.hair > div {
  width: 30px;
  height: 74px;
  border: solid 3px #000;
  border-color: transparent transparent transparent #000;
  border-radius: 90% 0 0 0;
  margin: 0 0 0 190px;
  transform: rotate(180deg);
}

.hair > div:last-child {
  margin: -25px 0 0 195px;
  transform: rotate(0deg);
}

#bow > .bowleft {
  width: 0;
  height: 0;
  border: 20px solid transparent;
  border-right: 0;
  border-left: 70px solid #cf3136;
  border-radius: 11%;
  transform: rotate(20deg);
  position: absolute;
  bottom: 0;
  margin: 0 0 -77px 144px;
}

#bow > .bowright {
  width: 0;
  height: 0;
  border: 20px solid transparent;
  border-left: 0;
  border-right: 70px solid #cf3136;
  border-radius: 11%;
  transform: rotate(20deg);
  margin: 0 0 -99px 206px;
  bottom: 0;
  position: absolute;
}

#bow > .knot {
  background-color: #cf3136;
  position: absolute;
  top: 63px;
  bottom: 0;
  width: 10px;
  height: 10px;
  margin: 0 0 0 204px;
  border-radius: 10px;
}

.mrsaturn {
  position: relative;
  margin: 110px auto;
  width: 240px;
  height: 240px;
  background-color: rgba(235 196 161);
  border-radius: 100% 100% 17% 17%/ 120% 120% 83% 83%;
  z-index: 1;
  background-image: radial-gradient(circle at bottom, #ecb077 30%, #e9b37c);
  box-shadow: inset -1px 17px 20px 10px #edcbab;
}

.eyebrows {
  display: flex;
  position: relative;
  top: 59px;
  justify-content: space-evenly;
}

.eyebrows > div {
  background-color: rgba(0, 0, 0, 1);
  margin: 0 19px;
  width: 46px;
  height: 20px;
  transform: rotate(351deg);
  border-radius: 38% 38% 50% 50%/ 70% 63% 50% 50%;
  box-shadow: 0px 2px 5px 0 #c17633;
}

.eyebrows > div:last-child {
  transform: rotate(187deg);
  left: 152px;
  box-shadow: 0px -2px 5px 0 #c17633;
}

.eyes {
  position: relative;
  top: 75px;
  display: flex;
  justify-content: space-evenly;
}

.eyes > div {
  background-color: rgba(0, 0, 0, 15);
  width: 14px;
  height: 15px;
  border-radius: 50% 50% 50% 50%/ 50% 50% 50% 50%;
  z-index: 10;
  margin: 0 19px;
  box-shadow: 1px 0 0px 1px #e08544;
}
.eyes > div:last-child {
  transform: rotate(187deg);
  left: 160px;
}

.nose {
  background-color: rgb(235 204 171);
  position: absolute;
  top: 112px;
  width: 138px;
  height: 120px;
  z-index: 3;
  margin: 0 auto;
  right: 0;
  left: 0;
  border-radius: 50% 50% 54% 54%/ 70% 60% 54% 54%;
  box-shadow: 0px -12px 19px 1px rgb(234 203 170);
}
.nose > div {
  margin: 5px;
  border-radius: 50% 50% 54% 54%/ 70% 60% 54% 54%;
  background-color: rgb(236 158 89 / 83%);
  width: 128px;
  height: 103px;
  margin-top: 20px;
  box-shadow: inset 0px 9px 20px 13px #ecccab;
}

.bottom {
  position: absolute;
  top: 204px;
  width: 232px;
  height: 38px;
  backgrou.........完整代码请登录后点击上方下载按钮下载查看

网友评论0