css+div实现煎汉堡效果代码

代码语言:html

所属分类:布局界面

代码描述:css+div实现煎汉堡效果代码

代码标签: css div 汉堡

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">





    <style>
        /*dimensions */
        /* Presets */
        *, *:before, *:after {
          padding: 0;
          margin: 0;
          box-sizing: border-box;
        }
        
        body {
          height: 100vh;
          display: flex;
          justify-content: center;
          align-items: center;
          background: linear-gradient(180deg, #B5DCAF 15%, #BCD9B2 100%);
        }
        
        div:before, div:after {
          display: block;
          content: "";
          position: absolute;
        }
        
        div.burger {
          width: 60vh;
          height: 50vh;
          position: relative;
          display: flex;
          justify-content: center;
          align-items: center;
          border-radius: 30%;
          background-color: #000000;
          background: linear-gradient(#000000 100%, #000000 100%) 0 0/100% 100% no-repeat;
        }
        
        div.burger:before {
          width: 60vh;
          height: 45vh;
          margin-top: -10vh;
          position: relative;
          display: flex;
          border: solid 10px #000000;
          justify-content: start;
          align-items: start;
          border-radius: 30%;
          background: repeating-linear-gradient(0deg, transparent 0 20px, black 20px 35px), repeating-linear-gradient(90deg, transparent 0 32%, black 32% 35%), radial-gradient(ellipse, #F8F4EA 0%, #B57336 60%) 0 0/100% 100% no-repeat;
        }
        
        div.burger:after {
          width: 85vh;
          height: 45vh;
          display: flex;
          overflow: visible;
          justify-content: start;
          align-items: start;
          transform: rotateZ(-20deg);
          background: radial-gradient(ellipse, black 0.5vh, #27100f 0.5vh, transparent 0.5vh) calc(14vh + 6.5vh) calc(10vh + 5vh)/1.5vh 10vh no-repeat, radial-gradient(ellipse, black 0.5vh, #27100f 0.5vh, transparent 0.5vh) calc(14vh + 9.5vh) calc(10vh + 2.5vh)/1.5vh 15vh no-repeat, radial-gradient(ellipse, black 0.5vh, #27100f 0.5vh, transparent 0.5vh) calc(14vh + 12.5vh) calc(10vh + 5vh)/1.5vh 10vh no-repeat, radial-gradient(circle, #712821 0vh, #220c0a 7.5vh, transparent 7.5vh) 14vh 10vh/20vh 20vh no-repeat, radial-gradient(ci.........完整代码请登录后点击上方下载按钮下载查看

网友评论0