单个div+css布局一个有毒容器瓶效果代码

代码语言:html

所属分类:布局界面

代码描述:单个div+css布局一个有毒容器瓶效果代码

代码标签: 一个 有毒 容器 效果

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">




    <style>
        *,
        *::before,
        *::after {
          box-sizing: border-box;
        }
        
        :root {
          --size: 100;
          --unit: calc((var(--size) / 100) * 1vmin);
        }
        
        body {
          background-color: lightpink;
          margin: 0;
        }
        
        div {
          height: calc(var(--unit) * 75);
          width: calc(var(--unit) * 75);
        
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
        
          background:
            /* Bottle top */
            linear-gradient(black 20%, lightblue 25% 80%, black 80%) 50% 23% / 16% 3.5%,
            radial-gradient(50% 50% at 103% 50%, lightblue 48%, black 48% 85%, transparent 52%) 40% 22.8% / 3.5% 4%,
            radial-gradient(50% 50% at -3% 50%, lightblue 48%, black 48% 85%, transparent 52%) 60% 22.8% / 3.5% 4%,
        
            /* Cork */
            radial-gradient(50% 50% at 50% 100%, SaddleBrown 48%, black 48% 59%, transparent 52%) 50% 14% / 20% 5%,
            linear-gradient(78deg, transparent 27%, black 27% 35%, SaddleBrown 35%) 47% 20% / 7% 10%,
            linear-gradient(102deg, SaddleBrown 65%, black 65% 73%, transparent 73%) 53% 20% / 7% 10%,
            radial-gradient(50% 50% at 50% 0%, SaddleBrown 48%, black 48% 59%, transparent 52% ) 50% 29% / 13% 4%,
          
            /* Bottle Base Inside */
            linear-gradient(102deg, transparent 71%, black 71% 72%, transparent 72%) 5% 54% / 50% 45%,
            linear-gradient(78deg, transparent 28%, black 28% 29%, transparent 29%) 95% 54% / 50% 45%,
            radial-gradient(75% 50% at 50% 0%, DeepPink 47%, black 47% 49%, transparent 49%) 50% 85% / 40% 12%,
        
            /* Potion */
            linear-gradient(102deg, transparent 71%, black 71% 72%, DeepPink 72%) 2% 68% / 50% 22%,
            linear-gradient(78deg, DeepPink 28%, black 28% 29%, transparent 29%) 98% 68% / 50% 22%,
          
            /* Bottle Base Outside*/
            radial-gradient(69% 50% at 50% 0%, lightblue 47%, black 47% 51%, transparent 51%) 50% 93% / 50% 20%,
            linear-gradient(102deg, transparent 71%, black 71% 73%, lightblue 73%) 0% 50% / 50% 50%,
            linear-gradient(78deg, lightblue 27%, black 27% 29%, transparent 29%) 100% 50% / 50% 50%.........完整代码请登录后点击上方下载按钮下载查看

网友评论0