div+css实现窗外花瓣飘落动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现窗外花瓣飘落动画效果代码

代码标签: div css 窗外 花瓣 飘落 动画

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


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

<head>

  <meta charset="UTF-8">

  
  
  
<style>
*{
  box-sizing: border-box;
}

body{
  background-color: #ee84b9;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.boxes{
  width: 600px;
  height: 600px;
  top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  position: relative;
}

.box{
  background-color: #3e0858;
  background-image: url("//repo.bfw.wiki/bfwrepo/icon/63ed7c0922a66.gif");
  background-repeat: no-repeat;
  background-size: 500px 500px;
  position: relative;
  height: 125px;
  width: 125px;
}

.box::after{
  content: "";
  background-color: #5a0b80;
  position: absolute;
  top: 8px;
  right: -15px;
  height: 100%;
  width: 15px;
  transform: skewY(45deg);
}

.box::before{
  content: "";
  background-color:#34064a;
  position: absolute;
  left: 8px;
  bottom: -15px;
  height: 15px;
  width: 100%;
  transform: skewX(45deg);
}
</style>


</head>

<body >
  <div id="boxes" class="boxes">
  <div class="box" style="background-position: 0 0"></div>
  <div class="box" style="background-position: -125px 0"></div>
  <div class="box" .........完整代码请登录后点击上方下载按钮下载查看

网友评论0