div+css实现多彩花瓣花朵动画效果代码

代码语言:html

所属分类:动画

代码描述:div+css实现多彩花瓣花朵动画效果代码

代码标签: div css 多彩 花瓣 花朵 动画

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

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

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

  
  
  
<style>
body {
  background-color: hsl(226, 62%, 10%);
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100dvh;
  overflow-x: hidden;
}
div {
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  container-type: inline-size;
  display: grid;
  grid-template-columns: 1fr;
  padding: 2em;
  place-content: center;
  translate: -.5em 0;
  width: 100%;
}
b {
  animation: animate 8s linear 0s infinite alternate;
  background: hsla(var(--deg), 80%, 50%, .5);
  border-radius: 40cqi;
  box-shadow: 0 0 0 .125cqi hsla(var(--deg), 80%, 90%, .5) inset;
  grid-column: 1 / -1;
  grid-row: 1 / -1;
  height: 40cqi;
  mix-blend-mode: screen;
  rotate: calc(45deg + var(--deg));
  transform-origin: calc(100% + .5em) 50%;
  width: 50%;
}
b:nth-of-type(1) { --deg: 20deg; }
b:nth-of-type(2) { --deg: 40deg; }
b:nth-of-type(3) { --deg: 60deg; }
b:nth-of-type(4) { --deg: 80deg; }
b:nth-of-type(5) { --deg: 100deg; }
b:nth-of-ty.........完整代码请登录后点击上方下载按钮下载查看

网友评论0