css实现宇航员登月效果代码
代码语言:html
所属分类:布局界面
代码描述:css实现宇航员登月效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
*,
*::after,
*::before {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,
body {
height: 100vh;
width: 100%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}
.man-on-moon {
background-color: #2e2926;
width: 100vmin;
height: 100vmin;
position: relative;
}
.sky {
background: rgba(46, 45, 45, 0.377);
width: 100vmin;
height: 100vmin;
position: relative;
/* z-index: -2; */
}
.moon {
height: 50vmin;
width: 100vmin;
border-radius: 50%;
position: relative;
background: #e9e8d2;
bottom: -85%;
clip-path: inset(0 0 70% 0);
}
.man {
/* background: red; */
width: 9vmin;
height: 15vmin;
position: absolute;
bottom: 16vmin;
left: 45vmin;
}
.foot {
position: absolute;
bottom: -1.5vmin;
left: 24%;
transform: translate(-50%, -50%);
height: 2.2vmin;
width: 4.4vmin;
border-radius: 150px 150px 0 0;
background-color: #b8b49b;
box-shadow: 4.5vmin 0 0 0 #b8b49b;
}
.leg1 {
width: 4.4vmin;
height: 4.4vmin;
background: #b8b49b;
background: radial-gradient(
circle 20px at -20% 50%,
transparent,
transparent 2.2vmin,
#b8b49b 2.2vmin
),
radial-gradient(
circle 20px at 120% 50%,
transparent,
transparent 2.2vmin,
#b8b49b 2.2vmin
);
background-size: 2.2vmin 4.4vmin, 2.2vmin 4.4vmin;
background-position: 0 0, 100% 0;
background-repeat: no-repeat;
transform: rotate(90deg);
position: absolute;
bottom: 0.5vmin;
}
.leg2 {
width: 4.4vmin;
height: 4.4vmin;
background: #b8b49b;
background: radial-gradient(
circle 20px at -20% 50%,
transparent,
transparent 2.2vmin,
#b8b49b 2.2vmin
),
radial-gradient(
circle 20px at 120% 50%,
transparent,
transparent 2.2vmin,
#b8b49b 2.2vmin
);
background-size: 2.2vmin 4.4vmin, 2.2vmin 4.4vmin;
background-position: 0 0, 100% 0;
background-repeat: no-repeat;
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0