纯css布局实现一个茶杯效果
代码语言:html
所属分类:布局界面
代码描述:纯css布局实现一个茶杯效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<style>
:root {
--mug-color: #9378B1;
--chamomile-color: #F4C17F;
--background-color: #E8E3FF;
--vapour-color: rgba(244, 193, 127, 0.5);
--dark-detail-color: #60557C;
}
body{
background: var(--background-color);
}
.box-canvas{
position: relative;
margin: auto;
display: block;
margin-top: 8%;
margin-bottom: 8%;
width: 600px;
height:600px;
background: var(--background-color);
}
.mug-body {
position: absolute;
left: 190px;
top: 200px;
width: 220px;
height: 260px;
background: var(--mug-color);
border-radius: 0 0 40% 40%;
}
/* Tea at the top of the mug */
.mug-body::before {
content: '';
position: absolute;
top: -45.........完整代码请登录后点击上方下载按钮下载查看
网友评论0