css实现窗外冬季雪花飞舞动画效果代码

代码语言:html

所属分类:动画

代码描述:css实现窗外冬季雪花飞舞动画效果代码

代码标签: 冬季 雪花 飞舞 动画 效果

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

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

<head>

  <meta charset="UTF-8">

  
  
<style>
* {
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #35a66f;
  text-align: center;
}

#christmas {
  background: #162a4e;
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzBjMWQzOCIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzFhMzE1OCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
  background-size: 100%;
  background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #0c1d38), color-stop(100%, #1a3158));
  background-image: -moz-linear-gradient(#0c1d38, #1a3158);
  background-image: -webkit-linear-gradient(#0c1d38, #1a3158);
  background-image: linear-gradient(#0c1d38, #1a3158);
  position: relative;
  width: 182px;
  height: 182px;
  margin: 50px auto;
  overflow: hidden;
  /* iOS hack for border radius bleed with transforms */
  -webkit-mask-image: -webkit-radial-gradient(circle, white, black);
}
#christmas .ground {
  -moz-border-radius-topright: 130px 40px;
  -webkit-border-top-right-radius: 130px 40px;
  border-top-right-radius: 130px 40px;
  position: absolute;
  width: 133px;
  height: 61px;
  left: 0;
  bottom: 0;
  background: white;
}
#christmas .ground:before {
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  content: " ";
  position: absolute;
  width: 130px;
  height: 100px;
  top: 10px;
  right: -60px;
  background: white;
}
#christmas .ground:after {
  -moz-border-radius: 50%;
  -webkit-border-radius: 50%;
  border-radius: 50%;
  content: " ";
  position: absolute;
  width: 70px;
  height: 70px;
  top: 5px;
  right: -75px;
  background: white;
}
#christmas .tree {
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-color: transparent transparent #23915b transparent;
}
#christmas .tree:before {
  content: " ";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-color: transparent transparent #23915b transparent;
}
#christmas .tree:after {
  content: " ";
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-color: transparent transparent #23915b transparent;
}
#christmas .tree.left {
  left: 28px;
  bottom: 78px;
  border-width: 0 18px 24px 18px;
}
#christmas .tree.left:before {
  top: 10px;
  left: -.........完整代码请登录后点击上方下载按钮下载查看

网友评论0