css布局实现一个仙人掌小人动画效果代码
代码语言:html
所属分类:动画
代码描述:css布局实现一个仙人掌小人动画效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
}
.back {
position: relative;
display: flex;
justify-content: center;
align-items: center;
background: #B9CFE4;
width: 100%;
height: 100vh;
}
.out{
position: relative;
display: flex;
justify-content: center;
align-content: center;
width: 80vmin;
height: 80vmin;
border-radius: 50%;
background: #B9CFE4;
}
.pot {
position: absolute;
/* by puting color here we can get the shape of pot and help of them we can make pot by lines*/
border-bottom: 19vmin solid #B9CFE4;
border-left: 8vmin solid transparent;
border-right: 8vmin solid transparent;
height: 0;
width: 30vmin;
top:40vmin;
transform: rotate(180deg);
border-radius: 3vmin;
}
.downlinw {
content: "";
position: absolute;
width: 15vmin;
height: 0.2vmin;
background: #000;
}
.Rightline {
content: "";
position: absolute;
width: 17vmin;
height: 0.2vmin;
top: 8.5vmin;
right: 7vmin;
background: #000;
transform: rotate(100deg)
}
.leftline {
content: "";
position: absolute;
width: 17vmin;
height: 0.2vmin;
top: 8.5vmin;
left: 8vmin;
background: #000;
transform: rotate(80deg)
}
.upperline1 {
content: "";
position: absolute;
width: 25vmin;
height: 0.5vmin;
top: 19vmin;
right: -6vmin;
background: #000;
}
.upperline2 {
content: "";
position: absolute;
width: 23vmin;
height: 0.2vmin;
top: 17vmin;
right: -5vmin;
background: #000;
}
.upperside1 {
content: "";
position: absolute;
width: 3vmin;
height: 0.5vmin;
top: 18vmin;
right: 17vmin;
background: #000;
transform: rotate(100deg)
}
.upperside2 {
content: "";
position: absolute;
width: 3vmin;
height: 0.5vmin;
top: 18vmin;
left: 18vmin;
background: #000;
transform: rotate(80deg)
}
.cactus{
position: absolute;
width: 20vmin;
height: 30vmin;
top: 17vmin;
background: #79C13B;
border-radius: 41%;
border: 0.4vmin solid #000;
}
.line3{
content: "";
position: absolute;
width: 5vmin;
height: 30vmin;
left: 10vmin;
background: transparent;
border-radius: 50%;
border-right:.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0