单个div+css实现可爱汉堡效果代码

代码语言:html

所属分类:布局界面

代码描述:单个div+css实现可爱汉堡效果代码

代码标签: 单个 div css 可爱 汉堡

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">




    <style>
        body {
          min-height: 300px;
          height: 100vh;
          position: relative;
          background-color: #fffacd;
        }
        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);
          }
        }
        #burger {
          width: 200px;
          height: 80px;
          margin-left: -100px;
          margin-top: -80px;
          background-repeat: no-repeat;
          background: radial-gradient(circle, black 50%, rgba(0,0,0,0) 52%) 38% 60%/1em 1em, radial-gradient(circle, white 50%, rgba(255,255,255,0) 51%) 35% 46%/3em 3em, radial-gradient(circle, black 50%, rgba(0,0,0,0) 52%) 62% 60%/1em 1em, radial-gradient(circle, white 50%, rgba(255,255,255,0) 51%) 65% 46%/3em 3em, radial-gradient(ellipse, #985f28 50%, rgba(205,133,63,0) 51%) 50% 84%/1.5em 1em, radial-gradient(ellipse, #ffefd5 50%, rgba(255,239,213,0) 52%) 25% 18%/0.6em 0.3em, radial-gradient(ellipse, #ffefd5 50%, rgba(255,239,213,0) 52%) 17% 30%/0.4em 0.4em, radial-gradient(ellipse, #ffefd5 50%, rgba(255,239,213,0) 52%) 10% 45%/0.3em 0.6em, radial-gradient(ellipse, #ffefd5 50%, rgba(255,239,213,0) 52%) 5% 65%/0.6em 0.3em, radial-gradient(ellipse, #ffefd5 50%, rgba(255,239,213,0) 52%) 15% 60%/0.4em 0.4em, radial-gradient(ellipse, #ffefd5 50%, rgba(255,239,213,0) 52%) 75% 18%/0.6em 0.3em, radial-gradient(ellipse, #ffefd5 50%, rgba(255,239,213,0) 52%) 83% 30%/0.4em 0.4em, radial-gradient(ellipse, #ffefd5 50%, rgba(255,239,213,0) 52%) 90% 45%/0.3em 0.6em, radial-gradient(ellipse, #ffefd5 50%, rgba(255,239,213,0) 52%) 95% 65%/0.6em 0.3em, radial-gradient(ellipse, #ffefd5 50%, rgba(255,239,213,0) 52%) 85% 60%/0.4em 0.4em, linear-gradient(to top, #daa470 10%, #cd853f 10%) 0 0/100% 100%;
          background-repeat: no-repeat;
          border-top-left-radius: 50% 80%;
          border-top-right-radius: 50% 80%;
          border-bottom-left-radius: 1em;
          border-bottom-right-radius: 1em;
          box-shadow: inset 2em 0.3em 0 rgba(139,69,19,0.2);
        }
        #burger.........完整代码请登录后点击上方下载按钮下载查看

网友评论0