ant-design/site/theme/static/santa.less

172 lines
2.8 KiB
Plaintext
Raw Normal View History

2017-12-25 13:53:16 +08:00
.santa {
display: inline-block;
margin-right: 8px;
margin-left: 8px;
vertical-align: middle;
2017-12-25 13:53:16 +08:00
}
.santa-body {
display: flex;
align-items: center;
2019-04-15 22:44:51 +08:00
justify-content: center;
2017-12-25 13:53:16 +08:00
width: 1em;
height: 1em;
color: #f91047;
font-size: 24px;
2017-12-25 13:53:16 +08:00
background-color: currentColor;
border-radius: 50%;
box-shadow: inset 0 -0.25em rgba(0, 0, 0, 0.1);
2017-12-25 13:53:16 +08:00
transform-origin: center bottom;
animation: balance alternate infinite 2s ease-in-out;
}
.santa-head {
position: relative;
2017-12-25 13:53:16 +08:00
width: 1em;
height: 1.9em;
font-size: 0.4em;
2017-12-25 13:53:16 +08:00
background-color: white;
border-radius: 0.5em;
transform: translateY(-1em);
}
.santa-head::before {
position: absolute;
top: 0.65em;
left: 0;
display: block;
2017-12-25 13:53:16 +08:00
width: 1em;
height: 0.375em;
background-color: #ff9876;
content: '';
2017-12-25 13:53:16 +08:00
}
.santa-ear {
position: absolute;
top: 0.75em;
width: 0.1em;
height: 0.3em;
background-color: #fc8363;
2017-12-25 13:53:16 +08:00
}
.santa-ear:nth-of-type(1) {
left: -0.1em;
border-radius: 0.05em 0 0 0.05em;
2017-12-25 13:53:16 +08:00
}
.santa-ear:nth-of-type(2) {
right: -0.1em;
border-radius: 0 0.05em 0.05em 0;
2017-12-25 13:53:16 +08:00
}
.santa-hat {
position: absolute;
top: 0.5em;
left: 0;
width: 1em;
height: 0.15em;
2017-12-25 13:53:16 +08:00
background-color: white;
transform: scale(1.1);
content: '';
2017-12-25 13:53:16 +08:00
}
.santa-hat::before {
position: absolute;
top: -0.5em;
z-index: 2;
2017-12-25 13:53:16 +08:00
display: block;
width: 1em;
height: 0.5em;
background: #f91047;
border-radius: 0.5em 0.5em 0 0;
content: '';
2017-12-25 13:53:16 +08:00
}
.santa-hat::after {
position: absolute;
top: -0.72em;
right: 0;
z-index: 0;
display: block;
2017-12-25 13:53:16 +08:00
width: 0.25em;
height: 0.25em;
background-color: white;
border-radius: 50%;
box-shadow: -0.2em 0.2em 0 0.12em rgba(0, 0, 0, 0.2), -0.2em 0.2em 0 0.12em #f91047;
/* pompom */
content: '';
2017-12-25 13:53:16 +08:00
}
.santa-eye {
position: absolute;
top: 0.76em;
left: 0.2em;
2017-12-25 13:53:16 +08:00
width: 0.12em;
height: 0.12em;
background-color: black;
border-radius: 50%;
}
.santa-eye + .santa-eye {
right: 0.2em;
left: auto;
2017-12-25 13:53:16 +08:00
}
.santa-nose {
position: absolute;
top: 0.84em;
left: 50%;
2017-12-25 13:53:16 +08:00
width: 0.12em;
height: 0.22em;
background-color: #f24c4c;
border-radius: 0 0 0.12em 0.12em;
transform: translateX(-50%);
}
.santa-mouth {
position: absolute;
top: 50%;
left: 50%;
2017-12-25 13:53:16 +08:00
width: 0.18em;
height: 0.1em;
margin-top: 0.3em;
background-color: black;
border-bottom-right-radius: 5vw;
border-bottom-left-radius: 5vw;
2017-12-25 13:53:16 +08:00
transform: translate(-50%, -50%);
animation: hohoho 4s linear forwards infinite;
}
@keyframes hohoho {
0%,
10%,
20%,
40%,
100% {
/* smiling */
width: 0.18em;
height: 0.1em;
border-bottom-right-radius: 1vw;
border-bottom-left-radius: 1vw;
}
5%,
15%,
25%,
35% {
/* hohoho */
width: 0.15em;
height: 0.2em;
border-radius: 50%;
}
}
@keyframes balance {
from {
transform: rotate(-4deg);
}
to {
transform: rotate(4deg);
}
}