jquery感恩节动画效果代码
代码语言:html
所属分类:动画
代码描述:jquery感恩节动画效果代码
代码标签: 效果
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<style>
@import url("https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@700&display=swap");
*,
*:before,
*:after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
*:before,
*:after {
position: absolute;
content: "";
}
:root {
--container-width: 50vw;
--color-black: #323232;
--color-orange: #fe911b;
--color-cream: #fef3e9;
--max-width: 50vh;
--text-timing: 0.25s;
--text-unit: 10;
--spacing-unit: 0.68;
--degree-unit: calc(var(--spacing-unit) *2);
--margin: 5vh;
}
html {
--background-color: var(--color-cream);
--stroke-color: var(--color-black);
}
html.dark-mode {
--background-color: var(--color-black);
--stroke-color: var(--color-cream);
}
body {
width: 100%;
height: 100vh;
overflow: hidden;
font-family: "Roboto Condensed", sans-serif;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background: var(--background-color);
}
body:before {
width: 100%;
height: 100%;
z-index: 100;
}
#container {
width: var(--container-width);
height: calc(var(--container-width) *1.4);
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
position: relative;
max-width: var(--max-width);
max-height: calc(var(--max-width) *1.4);
margin-top: -8%;
}
#container > div {
position: absolute;
}
#turkey-container {
position: absolute;
width: 43%;
height: auto;
margin-bottom: 35%;
bottom: 0;
margin-right: -6%;
}
#sun-container {
position: relative;
width: 38%;
height: auto;
margin-bottom: 35%;
bottom: 0;
opacity: 0;
}
.sun-animation {
animation: fade, shift;
animation-duration: calc(var(--text-timing) *4);
animation-fill-mode: forwards;
animation-delay: calc(var(--text-timing) *3);
}
@keyframes shift {
0% {
margin-left: 0;
}
100% {
margin-left: -12%;
}
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0