【HTML样式】加载动画专题 每周更新

加载动画专题

  • 煎蛋加载动画
  • 方块移动加载动画
  • 电子风变脸
  • 正方体组合
  • 跳跃式加载动画

煎蛋加载动画

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>
* {border: 0;box-sizing: border-box;margin: 0;padding: 0;
}
:root {--hue: 223;--bg: hsl(var(--hue), 10%, 90%);--fg: hsl(var(--hue), 10%, 10%);--trans-dur: 0.3s;font-size: calc(14px + (30 - 14) * (100vw - 280px) / (3840 - 280));
}
body {background-color: var(--bg);color: var(--fg);display: flex;font: 1em/1.5 sans-serif;height: 100vh;transition: background-color var(--trans-dur), color var(--trans-dur);
}
.pl {margin: auto;width: 12em;height: 12em;
}
.pl__drop, .pl__drop-inner, .pl__pan, .pl__ring, .pl__shadow {animation: pan 2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
.pl__drop {transform-origin: 13px 60px;
}
.pl__drop-inner {animation-timing-function: cubic-bezier(0.33, 0.84, 0.67, 0.84);
}
.pl__drop--1 {animation-name: drop-1;
}
.pl__drop--1 .pl__drop-inner {animation-name: drop- 1-inner;
}
.pl__drop--2 {animation-name: drop-2;
}
.pl__drop--2 .pl__drop-inner {animation-name: drop- 2-inner;
}
.pl__drop--3 {animation-name: drop-3;transform-origin: 67px 72px;
}
.pl__drop--3 .pl__drop-inner {animation-name: drop- 3-inner;
}
.pl__drop--4 {animation-name: drop-4;transform-origin: 67px 72px;
}
.pl__drop--4 .pl__drop-inner {animation-name: drop- 4-inner;
}
.pl__drop--5 {animation-name: drop-5;transform-origin: 67px 72px;
}
.pl__drop--5 .pl__drop-inner {animation-name: drop- 5-inner;
}
.pl__pan {transform-origin: 36px 74px;
}
.pl__ring {animation-name: flip-ring;
}
.pl__shadow {animation-name: pan-shadow;transform-origin: 36px 124.5px;
}
/* Dark theme */
@media (prefers-color-scheme: dark) {:root {--bg: hsl(var(--hue), 10%, 10%);--fg: hsl(var(--hue), 10%, 90%);}
}
/* Animation */
@keyframes drop-1 {from {animation-timing-function: steps(1, end);transform: translate(0, 0);visibility: hidden;}30% {animation-timing-function: linear;transform: translate(0, 0);visibility: visible;}50%, to {transform: translate(-6px, 0);}
}
@keyframes drop-1-inner {from, 30% {fill: #abafba;transform: translate(0, 0);}50%, to {fill: rgba(171, 175, 186, 0);transform: translate(0, -27px);}
}
@keyframes drop-2 {from {animation-timing-function: steps(1, end);transform: translate(0, 0);visibility: hidden;}30% {animation-timing-function: linear;transform: translate(0, 0);visibility: visible;}50%, to {transform: translate(-8px, 0);}
}
@keyframes drop-2-inner {from, 30% {fill: #abafba;transform: translate(0, 0);}50%, to {fill: rgba(171, 175, 186, 0);transform: translate(0, -9px);}
}
@keyframes drop-3 {from {animation-timing-function: steps(1, end);transform: translate(0, 0);visibility: hidden;}78% {animation-timing-function: linear;transform: translate(0, 0);visibility: visible;}98%, to {transform: translate(-24px, 0);}
}
@keyframes drop-3-inner {from, 78% {fill: #abafba;transform: translate(0, 0);}98%, to {fill: rgba(171, 175, 186, 0);transform: translate(0, -28px);}
}
@keyframes drop-4 {from {animation-timing-function: steps(1, end);transform: translate(0, 0);visibility: hidden;}78% {animation-timing-function: linear;transform: translate(0, 0);visibility: visible;}98%, to {transform: translate(-8px, 0);}
}
@keyframes drop-4-inner {from, 78% {fill: #abafba;transform: translate(0, 0);}98%, to {fill: rgba(171, 175, 186, 0);transform: translate(0, -36px);}
}
@keyframes drop-5 {from {animation-timing-function: steps(1, end);transform: translate(0, 0);visibility: hidden;}78% {animation-timing-function: linear;transform: translate(0, 0);visibility: visible;}98%, to {transform: translate(8px, 0);}
}
@keyframes drop-5-inner {from, 78% {fill: #abafba;transform: translate(0, 0);}98%, to {fill: rgba(171, 175, 186, 0);transform: translate(0, -32px);}
}
@keyframes flip-ring {from, 27% {animation-timing-function: cubic-bezier(0.33, 0.84, 0.67, 0.84);stroke-dashoffset: 20;stroke-width: 4px;}53.5% {animation-timing-function: cubic-bezier(0.33, 0.16, 0.67, 0.16);stroke-dashoffset: -100;stroke-width: 10px;}80%, to {stroke-dashoffset: -220;stroke-width: 4px;}
}
@keyframes pan {from, 88%, to {transform: translate(0, 0) rotate(0);}20% {animation-timing-function: cubic-bezier(0.33, 0.16, 0.67, 0.16);transform: translate(-5px, 0) rotate(-30deg);}30% {animation-timing-function: cubic-bezier(0.33, 0.84, 0.67, 0.84);transform: translate(0, 0) rotate(20deg);}60%, 78% {animation-timing-function: linear;transform: translate(0, 0) rotate(0);}81.33% {animation-timing-function: linear;transform: translate(0, 4px) rotate(0);}84.67% {animation-timing-function: linear;transform: translate(0, -2px) rotate(0);}
}
@keyframes pan-shadow {from, 88%, to {fill: rgba(115, 122, 140, 0.2);transform: scaleX(1);}20% {animation-timing-function: cubic-bezier(0.33, 0.16, 0.67, 0.16);fill: rgba(115, 122, 140, 0.2);transform: scaleX(0.77);}30% {animation-timing-function: cubic-bezier(0.33, 0.84, 0.67, 0.84);fill: rgba(115, 122, 140, 0.2);transform: scaleX(1);}60%, 78% {animation-timing-function: linear;fill: rgba(115, 122, 140, 0.2);transform: scaleX(1);}81.33% {animation-timing-function: linear;fill: rgba(115, 122, 140, 0.25);transform: scaleX(0.87);}84.67% {animation-timing-function: linear;fill: rgba(115, 122, 140, 0.225);transform: scaleX(1.065);}
}</style>
</head><body><svg class="pl" viewBox="0 0 128 128" width="128px" height="128px" role="img" aria-label="A pan being used to flip a blob resembling bacon as it splashes drops of grease in and out"><clipPath id="pan-clip"><rect rx="12" ry="14" x="4" y="52" width="68" height="28" /></clipPath><defs><linearGradient id="pl-grad" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="#000" /><stop offset="100%" stop-color="#fff" /></linearGradient><mask id="pl-mask"><rect x="0" y="0" width="88" height="80" fill="url(#pl-grad)" /></mask></defs><g fill="currentColor"><g fill="none" stroke-dasharray="20 221" stroke-dashoffset="20" stroke-linecap="round" stroke-width="4"><g stroke="hsl(38,90%,50%)"><circle class="pl__ring" cx="44" cy="40" r="35" transform="rotate(90,44,40)" /></g><g stroke="hsl(8,90%,40%)" mask="url(#pl-mask)"><circle class="pl__ring" cx="44" cy="40" r="35" transform="rotate(90,44,40)" /></g></g><g fill="hsla(223,10%,70%,0)"><g class="pl__drop pl__drop--1"><circle class="pl__drop-inner" cx="13" cy="60" r="2" /></g><g class="pl__drop pl__drop--2"><circle class="pl__drop-inner" cx="13" cy="60" r="2" /></g><g class="pl__drop pl__drop--3"><circle class="pl__drop-inner" cx="67" cy="72" r="2" /></g><g class="pl__drop pl__drop--4"><circle class="pl__drop-inner" cx="67" cy="72" r="2" /></g><g class="pl__drop pl__drop--5"><circle class="pl__drop-inner" cx="67" cy="72" r="2" /></g></g><g class="pl__pan"><rect rx="2" ry="2" x="4" y="66" width="68" height="14" clip-path="url(#pan-clip)" id="pan" /><rect rx="2" ry="2" x="76" y="66" width="48" height="7" /></g><rect class="pl__shadow" fill="hsla(223,10%,50%,0.2)" rx="3.5" ry="3.5" x="10" y="121" width="60" height="7" /></g></svg></body><script>
</script>
</html>

方块移动加载动画

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>
* {border: 0;box-sizing: border-box;margin: 0;padding: 0;
}
:root {--hue: 223;--bg: hsl(var(--hue),10%,90%);--fg: hsl(var(--hue),10%,10%);font-size: calc(16px + (24 - 16) * (100vw - 320px) / (1280 - 320));
}
body {background-color: var(--bg);color: var(--fg);font: 1em/1.5 sans-serif;height: 100vh;display: grid;place-items: center;transition: background-color 0.3s;
}
main {padding: 1.5em 0;
}.ap {width: 8em;height: 16em;
}
.ap__ring {stroke: hsla(var(--hue),10%,10%,0.15);transition: stroke 0.3s;
}
.ap__worm1,
.ap__worm2 {animation-duration: 3s;animation-iteration-count: infinite;
}
.ap__worm1 {animation-name: worm1;
}
.ap__worm2 {animation-name: worm2;visibility: hidden;
}/* Dark theme */
@media (prefers-color-scheme: dark) {:root {--bg: hsl(var(--hue),10%,10%);--fg: hsl(var(--hue),10%,90%);}.ap__ring {stroke: hsla(var(--hue),10%,90%,0.1);}
}/* Animtions */
@keyframes worm1 {from {animation-timing-function: ease-in-out;stroke-dashoffset: -87.96;}20% {animation-timing-function: ease-in;stroke-dashoffset: 0;}60% {stroke-dashoffset: -791.68;visibility: visible;}60.1%,to {stroke-dashoffset: -791.68;visibility: hidden;}
}
@keyframes worm2 {from,60% {stroke-dashoffset: -87.96;visibility: hidden;}60.1% {animation-timing-function: cubic-bezier(0,0,0.5,0.75);stroke-dashoffset: -87.96;visibility: visible;}77% {animation-timing-function: cubic-bezier(0.5,0.25,0.5,0.88);stroke-dashoffset: -340;visibility: visible;}to {stroke-dashoffset: -669.92;visibility: visible;}
}</style>
</head><body><main><svg class="ap" viewBox="0 0 128 256" width="128px" height="256px" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="ap-grad1" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="hsl(223,90%,55%)" /><stop offset="100%" stop-color="hsl(253,90%,55%)" /></linearGradient><linearGradient id="ap-grad2" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="hsl(193,90%,55%)" /><stop offset="50%" stop-color="hsl(223,90%,55%)" /><stop offset="100%" stop-color="hsl(253,90%,55%)" /></linearGradient></defs><circle class="ap__ring" r="56" cx="64" cy="192" fill="none" stroke="#ddd" stroke-width="16" stroke-linecap="round" /><circle class="ap__worm1" r="56" cx="64" cy="192" fill="none" stroke="url(#ap-grad1)" stroke-width="16" stroke-linecap="round" stroke-dasharray="87.96 263.89" /><path class="ap__worm2" d="M120,192A56,56,0,0,1,8,192C8,161.07,16,8,64,8S120,161.07,120,192Z" fill="none" stroke="url(#ap-grad2)" stroke-width="16" stroke-linecap="round" stroke-dasharray="87.96 494" /></svg></main></body><script></script>
</html>

电子风变脸

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>
body {background:#000 ;overflow:hidden;user-select:none;
}.emoji-box {position:absolute;width:100px;height:100px;top:50%;left:50%;border:solid white 0px;filter:/* url(#noise)url(#liquid)url(#anaglyph3d)*/  url(#pixelate-effect);;cursor:pointer;transition: all 1s;transform-origin:center;transform:translate(-50%,-50%) scale(1.6);transition-timing-function: cubic-bezier(0.860, 0.000, 0.070, 1.000);&:hover {transform: translate(-50%,-50%) scale(2);}
}#svg-emojis {filter:/* url(#noise)url(#pixelate-effect);*/  url(#liquid)url(#anaglyph3d);animation:r infinite 4s;transform-origin:center;animation-timing-function: cubic-bezier(0.860, 0.000, 0.070, 1.000);
}@keyframes r {0% {transform: rotate(25deg);}50% {transform: rotate(-25deg);}100% {transform: rotate(25deg);}
}
#svg-emojis path{opacity:0;transition: opacity 1s cubic-bezier(0.860, 0.000, 0.070, 1.000);
}/*
#emo-laugh{display:block;
}
#emo-angry{display:block;
}
#emo-bomb{display:block;
}
*/</style>
</head><body><div class="emoji-box"><svg id="svg-emojis" viewBox="-70 -70 600 600" width="100" title="laugh" id="emoji-laugh" oveflow="visible"><path id="emo-laugh" d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm80 152c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm-160 0c17.7 0 32 14.3 32 32s-14.3 32-32 32-32-14.3-32-32 14.3-32 32-32zm88 272h-16c-73.4 0-134-55-142.9-126-1.2-9.5 6.3-18 15.9-18h270c9.6 0 17.1 8.4 15.9 18-8.9 71-69.5 126-142.9 126z" /><path id="emo-bomb" d="M440.5 88.5l-52 52L415 167c9.4 9.4 9.4 24.6 0 33.9l-17.4 17.4c11.8 26.1 18.4 55.1 18.4 85.6 0 114.9-93.1 208-208 208S0 418.9 0 304 93.1 96 208 96c30.5 0 59.5 6.6 85.6 18.4L311 97c9.4-9.4 24.6-9.4 33.9 0l26.5 26.5 52-52 17.1 17zM500 60h-24c-6.6 0-12 5.4-12 12s5.4 12 12 12h24c6.6 0 12-5.4 12-12s-5.4-12-12-12zM440 0c-6.6 0-12 5.4-12 12v24c0 6.6 5.4 12 12 12s12-5.4 12-12V12c0-6.6-5.4-12-12-12zm33.9 55l17-17c4.7-4.7 4.7-12.3 0-17-4.7-4.7-12.3-4.7-17 0l-17 17c-4.7 4.7-4.7 12.3 0 17 4.8 4.7 12.4 4.7 17 0zm-67.8 0c4.7 4.7 12.3 4.7 17 0 4.7-4.7 4.7-12.3 0-17l-17-17c-4.7-4.7-12.3-4.7-17 0-4.7 4.7-4.7 12.3 0 17l17 17zm67.8 34c-4.7-4.7-12.3-4.7-17 0-4.7 4.7-4.7 12.3 0 17l17 17c4.7 4.7 12.3 4.7 17 0 4.7-4.7 4.7-12.3 0-17l-17-17zM112 272c0-35.3 28.7-64 64-64 8.8 0 16-7.2 16-16s-7.2-16-16-16c-52.9 0-96 43.1-96 96 0 8.8 7.2 16 16 16s16-7.2 16-16z" /><path id="emo-angry" d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM136 240c0-9.3 4.1-17.5 10.5-23.4l-31-9.3c-8.5-2.5-13.3-11.5-10.7-19.9 2.5-8.5 11.4-13.2 19.9-10.7l80 24c8.5 2.5 13.3 11.5 10.7 19.9-2.1 6.9-8.4 11.4-15.3 11.4-.5 0-1.1-.2-1.7-.2.7 2.7 1.7 5.3 1.7 8.2 0 17.7-14.3 32-32 32S136 257.7 136 240zm168 154.2c-27.8-33.4-84.2-33.4-112.1 0-13.5 16.3-38.2-4.2-24.6-20.5 20-24 49.4-37.8 80.6-37.8s60.6 13.8 80.6 37.8c13.8 16.5-11.1 36.6-24.5 20.5zm76.6-186.9l-31 9.3c6.3 5.8 10.5 14.1 10.5 23.4 0 17.7-14.3 32-32 32s-32-14.3-32-32c0-2.9.9-5.6 1.7-8.2-.6.1-1.1.2-1.7.2-6.9 0-13.2-4.5-15.3-11.4-2.5-8.5 2.3-17.4 10.7-19.9l80-24c8.4-2.5 17.4 2.3 19.9 10.7 2.5 8.5-2.3 17.4-10.8 19.9z" />    <path id="emo-dice" d="M106.75 215.06L1.2 370.95c-3.08 5 .1 11.5 5.93 12.14l208.26 22.07-108.64-190.1zM7.41 315.43L82.7 193.08 6.06 147.1c-2.67-1.6-6.06.32-6.06 3.43v162.81c0 4.03 5.29 5.53 7.41 2.09zM18.25 423.6l194.4 87.66c5.3 2.45 11.35-1.43 11.35-7.26v-65.67l-203.55-22.3c-4.45-.5-6.23 5.59-2.2 7.57zm81.22-257.78L179.4 22.88c4.34-7.06-3.59-15.25-10.78-11.14L17.81 110.35c-2.47 1.62-2.39 5.26.13 6.78l81.53 48.69zM240 176h109.21L253.63 7.62C250.5 2.54 245.25 0 240 0s-10.5 2.54-13.63 7.62L130.79 176H240zm233.94-28.9l-76.64 45.99 75.29 122.35c2.11 3.44 7.41 1.94 7.41-2.1V150.53c0-3.11-3.39-5.03-6.06-3.43zm-93.41 18.72l81.53-48.7c2.53-1.52 2.6-5.16.13-6.78l-150.81-98.6c-7.19-4.11-15.12 4.08-10.78 11.14l79.93 142.94zm79.02 250.21L256 438.32v65.67c0 5.84 6.05 9.71 11.35 7.26l194.4-87.66c4.03-1.97 2.25-8.06-2.2-7.56zm-86.3-200.97l-108.63 190.1 208.26-22.07c5.83-.65 9.01-7.14 5.93-12.14L373.25 215.06zM240 208H139.57L240 383.75 340.43 208H240z" /><path id="emo-flushed" d="M344 200c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm-192 0c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zM80 224c0-39.8 32.2-72 72-72s72 32.2 72 72-32.2 72-72 72-72-32.2-72-72zm232 176H184c-21.2 0-21.2-32 0-32h128c21.2 0 21.2 32 0 32zm32-104c-39.8 0-72-32.2-72-72s32.2-72 72-72 72 32.2 72 72-32.2 72-72 72z" /><path id="emo-vr-cardboard" style="transform:scale(.7);" d="M608 64H32C14.33 64 0 78.33 0 96v320c0 17.67 14.33 32 32 32h160.22c25.19 0 48.03-14.77 58.36-37.74l27.74-61.64C286.21 331.08 302.35 320 320 320s33.79 11.08 41.68 28.62l27.74 61.64C399.75 433.23 422.6 448 447.78 448H608c17.67 0 32-14.33 32-32V96c0-17.67-14.33-32-32-32zM160 304c-35.35 0-64-28.65-64-64s28.65-64 64-64 64 28.65 64 64-28.65 64-64 64zm320 0c-35.35 0-64-28.65-64-64s28.65-64 64-64 64 28.65 64 64-28.65 64-64 64z" /></svg></div><svgxmlns="http://www.w3.org/2000/svg"id="svg2"xml:space="preserve"width="0"height="0"oveflow="visible"viewBox="0 0 500 500"><filter id="liquid"><feGaussianBlur stdDeviation="1" id="feGaussianBlur1" result="gaussian_blur_result1" /><feComposite operator="in" in="gaussian_blur_result1" in2="result8" id="feComposite2" result="composite_result1" /><feGaussianBlur in="composite_result1" stdDeviation="1" id="feGaussianBlur2" result="gaussian_blur_result2" /><feSpecularLighting specularExponent="20" specularConstant="7" surfaceScale="5" lighting-color="#ffffff" result="result1" in="gaussian_blur_result2" id="feSpecularLighting2"><feDistantLight id="feDistantLight5" azimuth="45" elevation="100" /></feSpecularLighting><feComposite operator="in" in="result1" in2="composite_result1" id="feComposite3"  result="result2" /><feComposite k1="0" k2="1" k4="0" k3="1"  operator="arithmetic" result="result4" in="composite_result1" in2="result2" id="feComposite4" /><feComposite operator="in" in="result9" in2="result4" result="result9" id="feComposite5" /><feBlend mode="multiply" in="result9" in2="result9" id="feBlend5" /> <feFlood flood-color="cyan" flood-opacity=".8" result="flood2" /><feComposite in="flood2" in2="SourceAlpha" operator="in" result="mask2" /><feGaussianBlur in="mask2" stdDeviation="3" result="blur2" /><feMerge><feMergeNode in="blur" /><feMergeNode in="result9" /></feMerge>     </filter><filter id="anaglyph3d"><feOffset in="SourceGraphic" dx="-4" dy="0" result="left"/><feOffset in="SourceGraphic" dx="4" dy="0" result="right"/><feComponentTransfer in="left" result="leftRed"><feFuncR type="identity"></feFuncR><feFuncG type="discrete" tableValues="0"></feFuncG><!--      <feFuncB type="discrete" tableValues="0"></feFuncB> --></feComponentTransfer><feComponentTransfer in="right" result="rightCyan"><feFuncR type="discrete" tableValues="0"></feFuncR><feFuncG type="identity"></feFuncG><feFuncB type="identity"></feFuncB></feComponentTransfer><feBlend in="leftRed" in2="rightCyan" mode="screen"/></filter><filter id="pixelate-effect" x="0" y="0"><feFlood x="0" y="0" height="2" width="2"/>    <feComposite width="2" height="4"/><feTile x="0" y="0" width="1000" height="1000" result="c"/><feComposite in="SourceGraphic" in2="c" operator="in"/><feMorphology operator="dilate" radius=".5"/></filter>    <filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.002" numOctaves="1" seed="1" result="noise"><animate attributeName="baseFrequency" values="0.002;0.01;0.002" dur="8s" repeatCount="indefinite" /></feTurbulence><feDisplacementMap in="SourceGraphic" in2="noise" scale="20"> <animate attributeName="scale" values="20; 12; 20" dur="2s" repeatCount="indefinite" /></feDisplacementMap></svg>	  </body><script>
document.addEventListener("DOMContentLoaded", function() {const paths = document.querySelectorAll("#svg-emojis path");let currentIndex = 0;function showNextPath() {paths.forEach(path => path.style.display = "none");paths[currentIndex].style.display = "block";paths.forEach(path => path.style.opacity = 0);paths[currentIndex].style.opacity = 1;currentIndex = (currentIndex + 1) % paths.length;}paths.forEach(path => path.style.display = "none");paths[0].style.display = "block";paths.forEach(path => path.style.opacity = 0);paths[0].style.opacity = 1;setInterval(showNextPath, 2000);
});
</script>
</html>

正方体组合

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>
/* reset & base */
* {margin: 0;padding: 0;box-sizing: border-box;
}
html, body {padding: 0;margin: 0;
}
html {font-size: 62.5%;
}
body {font-size: 1.4rem;min-height: 100vh;background-color: #1f2029;perspective: 500;overflow: hidden;
}
.cube {position: absolute;top: 0;right: 0;bottom: 0;left: 0;display: flex;width: 10rem;height: 10rem;margin: auto;will-change: transform;transform-style: preserve-3d;animation: 20s cube-rotate linear infinite;
}
.cube .cube__face {position: absolute;top: 0;left: 0;display: flex;width: 100%;height: 100%;transform-style: preserve-3d;
}
.cube .cube__face.cube__face--front-side {background-color: #b4b6c6;transform: translateZ(5rem);animation: 5s unfold-front linear infinite;
}
.cube .cube__face.cube__face--back-side {background-color: #9799b0;transform: translateZ(-5rem);animation: 5s unfold-back linear infinite;
}
.cube .cube__face.cube__face--left-side {background-color: #7a7d9a;transform: translateX(-5rem) rotateY(90deg);animation: 5s unfold-left linear infinite;
}
.cube .cube__face.cube__face--right-side {background-color: #616480;transform: translateX(5rem) rotateY(90deg);animation: 5s unfold-right linear infinite;
}
.cube .cube__face.cube__face--top-side {background-color: #4b4d63;transform: translateY(-5rem) rotateX(90deg);animation: 5s unfold-top linear infinite;
}
.cube .cube__face.cube__face--bottom-side {background-color: #353746;transform: translateY(5rem) rotateX(90deg);animation: 5s unfold-bottom linear infinite;
}
@keyframes unfold-top {0%, 100% {transform: translateY(-5rem) rotateX(90deg);}50% {transform: translateY(-15rem) rotateX(90deg);}
}
@keyframes unfold-bottom {0%, 100% {transform: translateY(5rem) rotateX(90deg);}50% {transform: translateY(15rem) rotateX(90deg);}
}
@keyframes unfold-front {0%, 100% {transform: translateZ(5rem);}50% {transform: translateZ(15rem);}
}
@keyframes unfold-back {0%, 100% {transform: translateZ(-5rem);}50% {transform: translateZ(-15rem);}
}
@keyframes unfold-right {0%, 100% {transform: translateX(5rem) rotateY(90deg);}50% {transform: translateX(15rem) rotateY(90deg);}
}
@keyframes unfold-left {0%, 100% {transform: translateX(-5rem) rotateY(90deg);}50% {transform: translateX(-15rem) rotateY(90deg);}
}
@keyframes cube-rotate {100% {transform: rotateY(360deg) rotateX(720deg) rotateZ(1080deg);}
}</style>
</head><body><div class="cube"><div class="cube__face cube__face--front-side"></div><div class="cube__face cube__face--back-side"></div><div class="cube__face cube__face--left-side"></div><div class="cube__face cube__face--right-side"></div><div class="cube__face cube__face--top-side"></div><div class="cube__face cube__face--bottom-side"></div></div> </body><script></script>
</html>

跳跃式加载动画

在这里插入图片描述

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>Document</title><style>
* {border: 0;box-sizing: border-box;margin: 0;padding: 0;
}
:root {--hue: 223;--bg: hsl(var(--hue),10%,90%);--fg: hsl(var(--hue),10%,10%);font-size: calc(16px + (24 - 16) * (100vw - 320px) / (1280 - 320));
}
body {background-color: var(--bg);color: var(--fg);font: 1em/1.5 sans-serif;height: 100vh;display: grid;place-items: center;transition: background-color 0.3s;
}
main {padding: 1.5em 0;
}.ap {width: 8em;height: 16em;
}
.ap__ring {stroke: hsla(var(--hue),10%,10%,0.15);transition: stroke 0.3s;
}
.ap__worm1,
.ap__worm2 {animation-duration: 3s;animation-iteration-count: infinite;
}
.ap__worm1 {animation-name: worm1;
}
.ap__worm2 {animation-name: worm2;visibility: hidden;
}/* Dark theme */
@media (prefers-color-scheme: dark) {:root {--bg: hsl(var(--hue),10%,10%);--fg: hsl(var(--hue),10%,90%);}.ap__ring {stroke: hsla(var(--hue),10%,90%,0.1);}
}/* Animtions */
@keyframes worm1 {from {animation-timing-function: ease-in-out;stroke-dashoffset: -87.96;}20% {animation-timing-function: ease-in;stroke-dashoffset: 0;}60% {stroke-dashoffset: -791.68;visibility: visible;}60.1%,to {stroke-dashoffset: -791.68;visibility: hidden;}
}
@keyframes worm2 {from,60% {stroke-dashoffset: -87.96;visibility: hidden;}60.1% {animation-timing-function: cubic-bezier(0,0,0.5,0.75);stroke-dashoffset: -87.96;visibility: visible;}77% {animation-timing-function: cubic-bezier(0.5,0.25,0.5,0.88);stroke-dashoffset: -340;visibility: visible;}to {stroke-dashoffset: -669.92;visibility: visible;}
}</style>
</head><body><main><svg class="ap" viewBox="0 0 128 256" width="128px" height="256px" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="ap-grad1" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="hsl(223,90%,55%)" /><stop offset="100%" stop-color="hsl(253,90%,55%)" /></linearGradient><linearGradient id="ap-grad2" x1="0" y1="0" x2="0" y2="1"><stop offset="0%" stop-color="hsl(193,90%,55%)" /><stop offset="50%" stop-color="hsl(223,90%,55%)" /><stop offset="100%" stop-color="hsl(253,90%,55%)" /></linearGradient></defs><circle class="ap__ring" r="56" cx="64" cy="192" fill="none" stroke="#ddd" stroke-width="16" stroke-linecap="round" /><circle class="ap__worm1" r="56" cx="64" cy="192" fill="none" stroke="url(#ap-grad1)" stroke-width="16" stroke-linecap="round" stroke-dasharray="87.96 263.89" /><path class="ap__worm2" d="M120,192A56,56,0,0,1,8,192C8,161.07,16,8,64,8S120,161.07,120,192Z" fill="none" stroke="url(#ap-grad2)" stroke-width="16" stroke-linecap="round" stroke-dasharray="87.96 494" /></svg></main></body><script></script>
</html>

下一篇文章应该是Linux安装Java和Maven的脚本 如果想看的可以点个关注~

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/147410.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

Science Robotic 内在触觉实现直观的物理人机交互

触觉传感器和电子皮肤是为机器人提供物理交互感的常见设备&#xff0c;但当用于机器人的大面积覆盖时&#xff0c;它们会变得复杂且昂贵。德国宇航中心近期发表的Science Robotics研究工作&#xff0c;使用内部高分辨率关节力扭矩传感器&#xff0c;在机械臂中实现了固有的全身…

读构建可扩展分布式系统:方法与实践11强一致性

1. 强一致性 1.1. 最终一致数据库通过跨多台机器分区和复制数据集来获得可扩展性&#xff0c;其代价是要跨副本维持强数据一致性以及允许冲突写入 1.1.1. 在更新数据对象后&#xff0c;不同的客户端可能会看到该对象的旧值或新值&#xff0c;直到所有副本都收敛到最新值 1.2…

UDS诊断ISO14229新手入门篇

前言:参考ISO-14229 UDS 诊断教程(一) UDS 由 ISO-14229 系列标准定义,ISO 14229-1 定义了诊断服务,不涉及网络及实现,只有应用层的内容。而 ISO 14229-3 则定义了 UDS 在 CAN 总线上的实现。诊断通信的过程从用户角度来看非常容易理解,诊断仪发送诊断请求(request),…

MQ入门(一):同步调用和异步调用--RabbitMQ基础入门

目录 1.初识MQ 1.1.同步调用 1.2.异步调用 1.3.技术选型 2.RabbitMQ 2.1.安装部署 2.2.RabbitMQ基本架构 2.3.收发消息 2.3.1.交换机 2.3.2.队列 2.3.3.绑定关系 2.3.4.发送消息 2.4.数据隔离 2.4.1.用户管理 2.4.2.virtual host 1.初识MQ 微服务一旦拆分&…

DIN模型实现推荐算法

1. 项目简介 项目A030-DIN的核心是通过深度学习技术实现个性化推荐算法&#xff0c;旨在为用户提供精准、高效的商品或内容推荐。在现代电子商务、社交媒体及内容平台中&#xff0c;推荐系统作为核心功能&#xff0c;极大地提升了用户体验。DIN&#xff08;Deep Interest Netw…

Codeforces Round 973 (Div. 2) - D题

传送门&#xff1a;Problem - D - Codeforces 题目大意&#xff1a; 思路&#xff1a; 尽量要 最大值变小&#xff0c;最小值变大 即求 最大值的最小 和 最小值的最大 -> 二分答案 AC代码&#xff1a; 代码有注释 #include<bits/stdc.h> using namespace std; #…

无人机+自组网:中继通信增强技术详解

无人机与自组网技术的结合&#xff0c;特别是通过中继通信增强技术&#xff0c;为无人机在复杂环境中的通信提供了稳定、高效、可靠的解决方案。以下是对该技术的详细解析&#xff1a; 一、无人机自组网技术概述 无人机自组网技术是一种利用无人机作为节点&#xff0c;通过无…

指针修仙之实现qsort

文章目录 回调函数什么是回调函数回调函数的作用 库函数qsort使用qsort函数排序整形使用qsort函数排序结构体 qsort函数模拟实现说明源码and说明 回调函数 什么是回调函数 回调函数就是⼀个通过函数指针调⽤的函数。 如果你把函数的指针&#xff08;地址&#xff09;作为参数…

深度学习02-pytorch-01-张量的创建

深度学习 pytorch 框架 是目前最热门的。 深度学习 pytorch 框架相当于 机器学习阶段的 numpy sklearn 它将数据封装成张量(Tensor)来进行处理&#xff0c;其实就是数组。也就是numpy 里面的 ndarray . pip install torch1.10.0 -i https://pypi.tuna.tsinghua.edu.cn/simp…

蓝桥杯【物联网】零基础到国奖之路:七. 串口

蓝桥杯【物联网】零基础到国奖之路:七. 串口 第一节 串口通信理论第二节 软件通信协议第三节 DMA理论第四节 CubeMX的配置第五节 代码模版 第一节 串口通信理论 通用异步收发传输器&#xff08;UART&#xff09;是一种串行异步收发协议&#xff0c;应用十分广泛。UART将数据二…

HashMap扩容时机是插入前还是插入后?

结论 不管是HashMap还是ConcurrentHashMap都是插入后。 过程为&#xff1a; 先计算哈希值。对应的哈希槽插入数据&#xff0c;决定是红黑树还是链表插入完毕才计算是否需要扩容&#xff0c;假如需要则扩容 源码 源码如下&#xff1a; 其中addCount方法里面写入扩容。

Dash稳定版更新

大家好&#xff0c;今天要和大家聊聊一个开发Python网页应用的超级神器——Dash 2.18.1稳定版本正式发布啦&#xff01;此次更新&#xff0c;针对2.18.0版本的问题进行了修复和优化&#xff0c;为我们带来了更为稳定、强大的开发体验。 Dash是什么&#xff1f; Dash是一款基于P…

深度学习03-神经网络02-激活函数

可以使用这个进行跳转链接​​​​​​​http://playground.tensorflow.org/#activationrelu&batchSize11&datasetspiralDatasetreg-gauss&learningRate0.01ularizationRate0.1&noise0&networkShape7,5,4,3,2&seed0.54477&showTestDatafalse&d…

Excel VLOOKUP函数怎么用?vlookup函数的使用方法及案例

大家好&#xff0c;这里是效率办公指南&#xff01; &#x1f50e; 在Excel的世界里&#xff0c;VLOOKUP函数无疑是查询和数据分析中的明星。无论是从庞大的数据表中提取特定信息&#xff0c;还是进行数据的快速匹配&#xff0c;VLOOKUP都能大显身手。今天&#xff0c;我们将深…

第15章 程序的动态加载和执行

第15章 程序的动态加载和执行 该章节讲解了MBR加载内核&#xff0c;然后内核加载用户程序这样一套流程&#xff0c;模拟操作系统的工作原理。 本章代码清单 本章的代码实现的功能位&#xff1a;主引导扇区加载内核&#xff0c;内核加载用户程序&#xff0c;用户程序通过调用…

速通LLaMA3:《The Llama 3 Herd of Models》全文解读

文章目录 概览论文开篇IntroductionGeneral OverviewPre-TrainingPre-Training DataModel ArchitectureInfrastructure, Scaling, and EfficiencyTraining Recipe Post-TrainingResultsVision ExperimentsSpeech Experiments⭐Related WorkConclusionLlama 3 模型中的数学原理1…

【力扣每日一题——2374. 边积分最高的节点】python

2374. 边积分最高的节点 给你一个有向图&#xff0c;图中有 n 个节点&#xff0c;节点编号从 0 到 n - 1 &#xff0c;其中每个节点都 恰有一条 出边。 图由一个下标从 0 开始、长度为 n 的整数数组 edges 表示&#xff0c;其中 edges[i] 表示存在一条从节点 i 到节点 edges[…

mimics教程案例1-骨折三维重建

骨折三维重建 1 打开软件新建工程&#xff0c;将数据导入 FILE -> New Project ->找到自己的数据 ->Next ->Open 2 新建图层 SEFMENT -> New Mask ->选择阈值&#xff08;合适的阈值是可以将骨骼边缘覆盖住&#xff09;-> OK 3 使用Region Grow(区域增…

【全网最全】2024年华为杯研赛B题成品论文获取入口(后续会更新)

您的点赞收藏是我继续更新的最大动力&#xff01; 一定要点击如下的卡片&#xff0c;那是获取资料的入口&#xff01; 点击链接加入【2024华为杯研赛资料汇总】&#xff1a;https://qm.qq.com/q/hMgWngXvcQhttps://qm.qq.com/q/hMgWngXvcQ你是否在寻找数学建模比赛的突破点&a…

【无标题】HG6201M路由的超级管理密码获取

这里写自定义目录标题 1、开启telnet http://192.168.1.1/cgi-bin/telnetenable.cgi?telnetenable1&keyXXXXX 注意&#xff1a;此处的XXXXX为路由背面标签的MAC地址&#xff0c;去掉“-”&#xff0c;且大写。 成功后会显示&#xff1a;telnet开启 2、登录telnet 此处采…