纯css布局实现一个咖啡热气腾腾效果代码

代码语言:html

所属分类:布局界面

代码描述:纯css布局实现一个咖啡热气腾腾效果代码

代码标签: 实现 一个 咖啡 热气腾腾 效果

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


<!DOCTYPE html>
<html lang="en" >

<head>

  
  
  
<style>
body {
    background: #ad5c1a;
}
.cup{
    position: absolute;
    top: 38vmin;
    left: 40vmin;
    width: 30vmin;
    height: 25vmin;
    background: #e6d7b9;
    border-radius: 2% 2% 40% 40%;
    border-bottom: 1vmin ridge #41240d;
    box-shadow: -0.3vmin 0 0 #41240d, 
                0.3vmin 0 0 #41240d, 
                0 -0.2vmin 0 #41240d,
                inset 0 -0.8vmin 1vmin grey,
                inset -3vmin 0vmin 1vmin grey;
    
}
.cup::before {
    content: '';
    position: absolute;
    top: 12vmin;
    left: 13vmin;
    width: 10vmin;
    height: 4.5vmin;
    background: #ad5c1a;
    border-radius: 45%;
    border-top: 0.5vmin groove #41240d;
    box-shadow: 0 1.1vmin 0 #41240d,
                0 1.3vmin 0 #ad5c1a;
    transform: rotate(120deg);
}
.cup::after {
    content: '';
    position: absolute;
    top: 8vmin;
    left: 7vmin;
    width: 10vmin;
    height: 4.5vmin;
    background: #ad5c1a;
    border-radius: 45%;
    border-top: 0.5vmin groove #41240d;
    box-shadow: 0 1.1vmin 0 #41240d,
                0 1.3vmin 0 #ad5c1a;
    transform: rotate(-120deg);
}
.cup-handle {
    position: absolute;
    top: 41vmin;
    left: 32vmin;
    width: 10vmin;
    height: 8vmin;
    background: transparent;
    border-radius: 40%;
    border: 3vmin solid #e6d7b9;
    box-shadow: -0.5vmin 0 0 #41240d;
}
.cup-plate {
    position: absolute;
    top: 59.8vmin;
    left: 36vmin;
    width: 38vmin;
    height: 3vmin;
    background: transparent;
    border-radius: 40%;
    border-bottom: 2vmin ridge #e6d7b9;
    bo.........完整代码请登录后点击上方下载按钮下载查看

网友评论0