div+css实现卡通月亮数字跳动提醒消息动画效果代码
代码语言:html
所属分类:动画
代码描述:div+css实现卡通月亮数字跳动提醒消息动画效果代码
代码标签: div css 卡通 月亮 数字 跳动 提醒 消息 动画
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<style>
body {
margin: 0;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color: #2a2a2a;
background-repeat: repeat;
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
}
.notificationBox {
position: relative;
border: 0;
background: transparent;
padding: 25px;
z-index: 2;
animation: shake-animation 4.72s ease infinite;
}
.notificationBox svg {
width: 100px;
height: 100px;
animation: push 1.2s infinite alternate-reverse;
animation-fill-mode: forwards;
animation-timing-function: all 0.4s ease-in-out;
transform-origin: center;
animation-direction: reverse;
filter: drop-shadow(0px 0px 50px #ecc048);
}
.eyes {
display: flex;
gap: 5px;
position: absolute;
z-index: 3;
top: 43px;
left: 40px;
animation: eyes 1.2s infinite alternate-reverse;
animation-fill-mode: forwards;
animation-timing-function: all 0.4s ease-in-out;
transform-origin: left center;
animation-direction: reverse;
}
.eyes span {
width: 20px;
height: 20px;
border-radius: 50%;
background: #fff;
position: relative;
}
.eyes span:after {
content: "";
width: 10px;
height: 10px;
border-radius: 50%;
display: block;
background: #000;
margin: auto;
position: absolute;
inset: 0;
}
@keyframes push {
0,
100% {
transform: rotate(0);
}
50% {
transform: rotate(30deg);
}
}
@keyframes eyes {
0,
100% {
transform: rotate(0);
}
50% {
transform: rotate(30deg);
}
}
@keyfra.........完整代码请登录后点击上方下载按钮下载查看
网友评论0