css实现可乐冰块冷饮效果代码

代码语言:html

所属分类:布局界面

代码描述:css实现可乐冰块冷饮效果代码

代码标签: css 可乐 冰块 冷饮

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

<!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">




    <style>
        body {
          display: flex;
          justify-content: center;
          align-items: center;
          height: 100vh;
          width: 100vw;
          overflow: hidden;
          background: #F1E3D3;
        }
        
        .glass {
          width: 9rem;
          height: 20rem;
          border: 0.35rem solid #000;
          border-radius: 0 0 10% 10%;
          padding: 1rem;
          position: relative;
        }
        
        .drink {
          width: 100%;
          height: 100%;
          background: linear-gradient(#FCE327, #FF3525);
          border-radius: 0 0 10% 10%;
        }
        
        .straw {
          width: 0.5rem;
          height: 3rem;
          background: red;
          position: absolute;
          top: -3.25rem;
          right: 3rem;
          transform: rotate(10deg);
        }
        
        .straw:before, .straw:after {
          content: "";
          position: absolute;
          background-color: red;
          width: 0.5rem;
        }
        
        .straw:before {
          height: 3rem;
          top: -2.65rem;
          left: 0.725rem;
.........完整代码请登录后点击上方下载按钮下载查看

网友评论0