css实现订阅与取消订阅小兔子动画表情效果代码
代码语言:html
所属分类:其他
代码描述:css实现订阅与取消订阅小兔子动画表情效果代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<link rel='stylesheet' href='https://fonts.googleapis.com/css2?family=Poppins:wght@100;400;600;800&family=Roboto:wght@400;700&display=swap'>
<style>
*,
*:after,
*:before {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "Poppins";
background: #3173f6;
background-size: cover;
height: 100vh;
display: grid;
place-items: center;
}
.card {
background: #fff;
width: calc(100% - 40px);
max-width: 640px;
padding: 20px;
text-align: center;
padding-top: 260px;
position: relative;
}
.card h3 {
margin: 0 0 10px;
font-size: 24px;
color: #263238;
font-weight: 700;
}
.card p {
margin: 0 0 15px;
color: #546e7a;
}
.btn {
padding: 13px 10px;
border: none;
min-width: 180px;
border-radius: 4px;
transition: 0.2s ease-in;
font-weight: 800;
font-size: 16px;
cursor: pointer;
box-shadow: 0 2px 6px #0001;
}
.btn:hover {
box-shadow: 0 3px 15px #0002;
}
.btn + .btn {
margin-left: 10px;
}
.btn-primary {
background: #304ffe;
color: #fff;
}
.btn-primary:hover {
background: #536dfe;
}
.btn-secondary {
background: #f5f5f5;
}
.btn-secondary:hover {
background: #e0e0e0;
}
.emo-container {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 240px;
display: flex;
justify-content: center;
align-items: flex-end;
padding-bottom: 0px;
background: #3173f6;
}
.emo-container * {
transition: 0.2s ease-in;
}
.bunny {
height: 180px;
width: 130px;
background: #fff;
border-radius: 100px;
border: 1px solid #eee;
position: relative;
z-index: 10;
transform: translateY(8px);
}
.bunny .leg {
position: absolute;
background: #fefefe;
width: 45px;
height: 70px;
bottom: 10px;
z-index: 20;
border-radius: 50px;
transform-origin: 22.5px 70px 0;
border: 1px solid #eee;
}
.bunny .leg:before {
content: "";
position: absolute;
top: 5px;
color: #d571a6;
background: currentcolor;
left: 50%;
transform: translateX(-50%);
width: 12px;
height: 13px;
border-radius: 50%;
box-shadow: 12px 7px 0 -2px, -12px 7px 0 -2px;
}
.bunny .leg.l {
left: 15px;
transform: rotate(-40deg);
box-shadow: 0px -3px 6px #0001;
animation: 1.4s doubtLegL ease-out infinite alternate;
}
.bunny .leg.r {
transform: rotate(40deg);
right: 15px;
box-shadow: 3px 0px 6px #0001;
animation: 1.4s doubtLegR ease-out infinite alternate;
}
.bunny .face {
background: #fff;
width: 100%;
height: 100%;
border-radius: 100px;
z-index: 10;
position: relative;
}
.bunny .face .eye {
top: 25px;
position: absolute;
z-index: 6;
border-radius: 50%;
width: 20px;
height: 20px;
border: 2px solid #444;
background: radial-gradient(circle 5px, #222 100%, transparent 0) no-repeat;
.........完整代码请登录后点击上方下载按钮下载查看
网友评论0