css+div布局绘制光芒四射的可爱太阳代码

代码语言:html

所属分类:布局界面

代码描述:css+div布局绘制光芒四射的可爱太阳代码

代码标签: css div 布局 绘制 光芒 四射 可爱 太阳 代码

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

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

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

  
  
  
<style>
@property --modif {
  syntax: '<number>';
  inherits: false;
  initial-value: 1;
}

@property --transY {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}

figure {
  font-size: 1vmin;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50em;
  aspect-ratio: 1;
  overflow: hidden;
  
  figcaption {
    transform: translate(0, -2em);
  }
  
  .center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 25em;
    transform: translate(-50%, -50%);
    aspect-ratio: 1;
    background: #fc0;
    border-radius: 50% 48% 47% 52%;
    animation: 
      rotate 5s infinite,
      shake 4.7s infinite;
    
    .cheek {
      --pos: 30%;
      width: 11%;
      aspect-ratio: 1.5;
      border-radius: 50%;
      background: #f003;
      position: absolute;
      transform: translate(-50%, -50%);
      top: 67%;
      left: var(--pos);
      
      & + & {
        left: calc(100% - var(--pos));
      }
    }
    
    .eye {
      --pos: 35%;
      width: 11%;
      aspect-ratio: 1;
      border-radius: 50%;
      background: #000;
      position: absolute;
      transform: translate(-50%, -50%);
      top: 60%;
   .........完整代码请登录后点击上方下载按钮下载查看

网友评论0