div+css绘制雪人效果代码

代码语言:html

所属分类:布局界面

代码描述:div+css绘制雪人效果代码

代码标签: css 雪人

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">






    <style>
        body {
          height: 100vh;
          overflow: hidden;
          position: relative;
          background-color: lightskyblue;
          text-align: center;
        }
        
        div {
          position: absolute;
          left: 50%;
          top: 50%;
          transform:translate(-50%,-50%);
        }
        
        .face {
          width: 200px;
          height: 150px;
          background:white;
          top: 40%;
          border-radius: 46% 57% 65% 32% / 76% 59% 42% 26%;
        }
        
        .eye1 {
          width: 15px;
          height: 15px;
          background: black;
          top: 35%;
          left: 40%;
          border-radius: 50%;
        }
        
        .eye2 {
          width: 15px;
          height: 15px;
          background: black;
          top: 30%;
          left: 60%;
          border-radius: 50%;
        }
        
        .blush1 {
          width: 30px;
          height: 30px;
          background: pink;
          top: 40%;
          left: 70%;
          border-radius: 50%;
          transform: rotate(90deg);
        }
        
        .blush2 {
          width: 30px;
          height: 30px;
          background: pink;
          top: 40%;
          left: 25%;
          border-radius: 50%;
          transform: rotate(90deg);
        }
        
        .nose {
          width: 25px;
          height: 80px;
          background: orange;
          top: 12%;
          left: 63%;
          transform: rotate(50deg);
          border-radius: 50% 50% 40% 40% / 100% 100% 10% 10%;
          z-index: 2.........完整代码请登录后点击上方下载按钮下载查看

网友评论0