css布局实现咖啡盘子效果代码
代码语言:html
所属分类:布局界面
代码描述:css布局实现咖啡盘子效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html> <html lang="en" > <head> <meta charset="UTF-8"> <style> body { margin: 0; padding: 0; box-sizing: border-box; background: brown; display: flex; justify-content: center; align-items: center; font-family: sans-serif; } /* saucer */ .bottom { position: absolute; top: 30%; width: 300px; height: 300px; background: #ccc; border-radius: 50%; box-shadow: -12px 11px 34px -2px #0f0f0f; } .cup { width: 170px; height: 170px; position: relative; left: 40px; top: 60px; background: #ccc; border-radius: 50%; box-shadow: -12px 11px 34px -2px #0f0f0f, -12px 11px 34px -2px #0f0f0f; } /* cup handle */ .cup::before { content: ""; width: 25px; height: 35px; position: absolute; background: #ccc; top: 110px; transform: rotate(-45deg); left: 20px; box-shadow: -12px 11px 34px -2px #0f0f0f, -12px 11px 34px -2px #0f0f0f; z-index: 3; border-radius: 25px 0 0 25px; } .liquid { position: relative; background: rgb(119, 31, 31); border: 10px solid #ccc; box-shadow: -12px 11px 34px -2px #0f0f0f; width: 110px; height: 110px; border-radius: 50%; left: 20px; top: 10px; } .liquid::after { content: ""; width: 10px; height: 35px; border-top-.........完整代码请登录后点击上方下载按钮下载查看
网友评论0