div+css实现单个div布局立体落叶效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css实现单个div布局立体落叶效果代码

代码标签: css 单个 div 布局 立体 落叶

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

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

<head>
  <meta charset="UTF-8">
  

  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">

  
  
<style>
body {
  min-height: 300px;
  height: 100vh;
  position: relative;
  background-color: #a0522d;
  text-align: center;
}
div {
  position: absolute;
  left: 50%;
  top: 50%;
}
div::before,
div::after {
  display: block;
  content: '';
  position: absolute;
}
@media (max-width: 400px) {
  div:not(.no-scale) {
    transform: scale(0.8);
  }
}
#fall {
  --fallcolor1: #ffd700;
  --fallcolor2: #dc143c;
  background-image: repeating-linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,0) 0.3em, rgba(0,0,0,0.02) 0.3em, rgba(0,0,0,0.02) 0.4em), repeating-linear-gradient(to top, rgba(0,0,0,0), rgba(0,0,0,0) 0.3em, rgba(0,0,0,0.02) 0.3em, rgba(0,0,0,0.02) 0.4em), conic-gradient(from 225deg, var(--fallcolor1), var(--fallcolor2));
  width: 8em;
  height: 8em;
  margin-left: -4em;
  margin-top: -6.5em;
  border-radiu.........完整代码请登录后点击上方下载按钮下载查看

网友评论0