1 Star 9 Fork 1

小枫/圣诞树代码

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
style.css 10.76 KB
一键复制 编辑 原始数据 按行查看 历史
小枫 提交于 2022-12-09 18:40 . 小枫的圣诞树代码
:root {
--xf_background_gradient: to right top, #bba9a7, #dfecf9, #a4b3d2 100%;
--xf_text_gradient: to right top, #2199bc, #009980;
--xf_top_1: 11%;
--xf_top_2: 22%;
--xf_top_3: 33%;
--xf_top_4: 44%;
--xf_top_5: 55%;
--xf_translateZ_1: 50px;
--xf_translateZ_2: 80px;
--xf_translateZ_3: 110px;
--xf_translateZ_4: 140px;
--xf_translateZ_5: 190px;
}
@font-face {
font-family: "RAGE";
src: url('RAGE.ttf'), url('RAGE.ttf');
}
* {
padding: 0;
margin: 0;
}
a {
color: #009980;
text-decoration: none;
-webkit-transition: color 0.3s;
transition: color 0.3s;
}
::-moz-selection {
background-color: #ffc0cb;
color: #fff;
}
::-webkit-selection {
background-color: #ffc0cb;
color: #fff;
}
::selection {
background-color: #ffc0cb;
color: #fff;
}
body {
width: 100%;
height: 100vh;
background-attachment: fixed;
background: -webkit-linear-gradient(var(--xf_background_gradient));
background: -moz-linear-gradient(var(--xf_background_gradient));
background: -o-linear-gradient(var(--xf_background_gradient));
background: -ms-linear-gradient(var(--xf_background_gradient));
background: linear-gradient(var(--xf_background_gradient));
background-repeat: no-repeat;
background-size: cover;
overflow-x: hidden;
overflow-y: hidden;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: transparent;
-moz-filter: blur(10px);
-webkit-filter: blur(10px);
filter: blur(10px);
-moz-animation: xf_filter 3s;
-webkit-animation: xf_filter 3s;
-o-animation: xf_filter 3s;
animation: xf_filter 3s;
-moz-animation-iteration-count: 1;
-webkit-animation-iteration-count: 1;
-o-animation-iteration-count: 1;
animation-iteration-count: 1;
-moz-animation-fill-mode: forwards;
-webkit-animation-fill-mode: forwards;
-o-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
@keyframes xf_filter {
100% {
filter: blur(0);
}
}
body audio {
display: block;
margin: 30px auto 0;
opacity: 0.5;
-webkit-transition: opacity 0.5s;
transition: opacity 0.5s;
}
body audio:hover {
-webkit-opacity: 1;
opacity: 1;
}
body section {
display: flex;
width: 100%;
}
body section .xf_left_box {
position: relative;
-webkit-perspective: 700px;
perspective: 700px;
width: 50%;
height: 100vh;
}
body section .xf_left_box .xf_public {
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
position: absolute;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
width: 80px;
height: 75px;
-o-animation: xfrotate 15s linear infinite;
-ms-animation: xfrotate 15s linear infinite;
-moz-animation: xfrotate 15s linear infinite;
-webkit-animation: xfrotate 15s linear infinite;
animation: xfrotate 15s linear infinite;
}
body section .xf_left_box .xf_public li {
list-style: none;
position: absolute;
border: 2px solid #fff;
-moz-box-shadow: 0 0 3px 3px rgba(255, 255, 255, 0.5);
-webkit-box-shadow: 0 0 3px 3px rgba(255, 255, 255, 0.5);
box-shadow: 0 0 3px 3px rgba(255, 255, 255, 0.5);
}
body section .xf_left_box .xf_public li img {
display: block;
width: 100%;
height: 100%;
}
body section .xf_left_box .xf_rotate_1 {
top: var(--xf_top_1);
}
body section .xf_left_box .xf_rotate_1 li:nth-child(1) {
transform: rotateY(0) translateZ(var(--xf_translateZ_1));
}
body section .xf_left_box .xf_rotate_1 li:nth-child(2) {
transform: rotateY(90deg) translateZ(var(--xf_translateZ_1));
}
body section .xf_left_box .xf_rotate_1 li:nth-child(3) {
transform: rotateY(180deg) translateZ(var(--xf_translateZ_1));
}
body section .xf_left_box .xf_rotate_1 li:nth-child(4) {
transform: rotateY(270deg) translateZ(var(--xf_translateZ_1));
}
body section .xf_left_box .xf_rotate_2 {
top: var(--xf_top_2);
}
body section .xf_left_box .xf_rotate_2 li:nth-child(1) {
transform: rotateY(0) translateZ(var(--xf_translateZ_2));
}
body section .xf_left_box .xf_rotate_2 li:nth-child(2) {
transform: rotateY(60deg) translateZ(var(--xf_translateZ_2));
}
body section .xf_left_box .xf_rotate_2 li:nth-child(3) {
transform: rotateY(120deg) translateZ(var(--xf_translateZ_2));
}
body section .xf_left_box .xf_rotate_2 li:nth-child(4) {
transform: rotateY(180deg) translateZ(var(--xf_translateZ_2));
}
body section .xf_left_box .xf_rotate_2 li:nth-child(5) {
transform: rotateY(240deg) translateZ(var(--xf_translateZ_2));
}
body section .xf_left_box .xf_rotate_2 li:nth-child(6) {
transform: rotateY(300deg) translateZ(var(--xf_translateZ_2));
}
body section .xf_left_box .xf_rotate_3 {
top: var(--xf_top_3);
}
body section .xf_left_box .xf_rotate_3 li:nth-child(1) {
transform: rotateY(0) translateZ(var(--xf_translateZ_3));
}
body section .xf_left_box .xf_rotate_3 li:nth-child(2) {
transform: rotateY(45deg) translateZ(var(--xf_translateZ_3));
}
body section .xf_left_box .xf_rotate_3 li:nth-child(3) {
transform: rotateY(90deg) translateZ(var(--xf_translateZ_3));
}
body section .xf_left_box .xf_rotate_3 li:nth-child(4) {
transform: rotateY(135deg) translateZ(var(--xf_translateZ_3));
}
body section .xf_left_box .xf_rotate_3 li:nth-child(5) {
transform: rotateY(180deg) translateZ(var(--xf_translateZ_3));
}
body section .xf_left_box .xf_rotate_3 li:nth-child(6) {
transform: rotateY(225deg) translateZ(var(--xf_translateZ_3));
}
body section .xf_left_box .xf_rotate_3 li:nth-child(7) {
transform: rotateY(270deg) translateZ(var(--xf_translateZ_3));
}
body section .xf_left_box .xf_rotate_3 li:nth-child(8) {
transform: rotateY(315deg) translateZ(var(--xf_translateZ_3));
}
body section .xf_left_box .xf_rotate_4 {
z-index: 1;
top: var(--xf_top_4);
}
body section .xf_left_box .xf_rotate_4 li:nth-child(1) {
transform: rotateY(0) translateZ(var(--xf_translateZ_4));
}
body section .xf_left_box .xf_rotate_4 li:nth-child(2) {
transform: rotateY(36deg) translateZ(var(--xf_translateZ_4));
}
body section .xf_left_box .xf_rotate_4 li:nth-child(3) {
transform: rotateY(72deg) translateZ(var(--xf_translateZ_4));
}
body section .xf_left_box .xf_rotate_4 li:nth-child(4) {
transform: rotateY(108deg) translateZ(var(--xf_translateZ_4));
}
body section .xf_left_box .xf_rotate_4 li:nth-child(5) {
transform: rotateY(144deg) translateZ(var(--xf_translateZ_4));
}
body section .xf_left_box .xf_rotate_4 li:nth-child(6) {
transform: rotateY(180deg) translateZ(var(--xf_translateZ_4));
}
body section .xf_left_box .xf_rotate_4 li:nth-child(7) {
transform: rotateY(216deg) translateZ(var(--xf_translateZ_4));
}
body section .xf_left_box .xf_rotate_4 li:nth-child(8) {
transform: rotateY(252deg) translateZ(var(--xf_translateZ_4));
}
body section .xf_left_box .xf_rotate_4 li:nth-child(9) {
transform: rotateY(288deg) translateZ(var(--xf_translateZ_4));
}
body section .xf_left_box .xf_rotate_4 li:nth-child(10) {
transform: rotateY(324deg) translateZ(var(--xf_translateZ_4));
}
body section .xf_left_box .xf_rotate_5 {
z-index: 0;
top: var(--xf_top_5);
}
body section .xf_left_box .xf_rotate_5 li:nth-child(1) {
transform: rotateY(0) translateZ(var(--xf_translateZ_5));
}
body section .xf_left_box .xf_rotate_5 li:nth-child(2) {
transform: rotateY(30deg) translateZ(var(--xf_translateZ_5));
}
body section .xf_left_box .xf_rotate_5 li:nth-child(3) {
transform: rotateY(60deg) translateZ(var(--xf_translateZ_5));
}
body section .xf_left_box .xf_rotate_5 li:nth-child(4) {
transform: rotateY(90deg) translateZ(var(--xf_translateZ_5));
}
body section .xf_left_box .xf_rotate_5 li:nth-child(5) {
transform: rotateY(120deg) translateZ(var(--xf_translateZ_5));
}
body section .xf_left_box .xf_rotate_5 li:nth-child(6) {
transform: rotateY(150deg) translateZ(var(--xf_translateZ_5));
}
body section .xf_left_box .xf_rotate_5 li:nth-child(7) {
transform: rotateY(180deg) translateZ(var(--xf_translateZ_5));
}
body section .xf_left_box .xf_rotate_5 li:nth-child(8) {
transform: rotateY(210deg) translateZ(var(--xf_translateZ_5));
}
body section .xf_left_box .xf_rotate_5 li:nth-child(9) {
transform: rotateY(240deg) translateZ(var(--xf_translateZ_5));
}
body section .xf_left_box .xf_rotate_5 li:nth-child(10) {
transform: rotateY(270deg) translateZ(var(--xf_translateZ_5));
}
body section .xf_left_box .xf_rotate_5 li:nth-child(11) {
transform: rotateY(300deg) translateZ(var(--xf_translateZ_5));
}
body section .xf_left_box .xf_rotate_5 li:nth-child(12) {
transform: rotateY(330deg) translateZ(var(--xf_translateZ_5));
}
@keyframes xfrotate {
0% {
transform: rotateY(0);
}
100% {
transform: rotateY(360deg);
}
}
body section .xf_right_box {
position: relative;
width: 50%;
height: 100vh;
padding: 3%;
}
body section .xf_right_box .xf_title {
margin-top: 2%;
background-image: -webkit-linear-gradient(var(--xf_text_gradient));
background-image: -moz-linear-gradient(var(--xf_text_gradient));
background-image: -o-linear-gradient(var(--xf_text_gradient));
background-image: -ms-linear-gradient(var(--xf_text_gradient));
background-image: linear-gradient(var(--xf_text_gradient));
font-family: "RAGE";
-webkit-background-clip: text;
background-clip: text;
color: transparent;
font-size: 3rem;
-moz-text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
-webkit-text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}
body section .xf_right_box .xf_video {
margin-top: 5%;
width: 20em;
-o-box-shadow: 1px 1px 5px 2px rgba(0, 102, 255, 0.35);
-moz-box-shadow: 1px 1px 5px 2px rgba(0, 102, 255, 0.35);
-webkit-box-shadow: 1px 1px 5px 2px rgba(0, 102, 255, 0.35);
box-shadow: 1px 1px 5px 2px rgba(0, 102, 255, 0.35);
}
body footer {
position: fixed;
bottom: 0;
width: 100%;
height: 3.6em;
text-align: center;
font-family: '黑体', 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
font-weight: bold;
color: #a4a4a4;
}
body footer p {
display: inline-block;
font-size: 1.1rem;
border-bottom: 1px solid #adadad;
}
body footer p a:hover {
color: #5c77bd;
}
body .xf_canvas {
position: fixed;
top: 0;
left: 0;
display: block;
-webkit-pointer-events: none;
pointer-events: none;
width: 100%;
height: 100%;
z-index: 1809185784;
}
body .xf_left_box,
body .xf_title,
body .xf_video {
display: none;
}
@media screen and (max-width: 730px) {
body {
overflow-x: hidden;
overflow-y: hidden;
}
body section {
display: flex;
flex-direction: column-reverse;
}
body section .xf_left_box {
margin-top: 3%;
width: 100%;
height: 100vh;
-moz-zoom: 0.75;
-ms-zoom: 0.75;
zoom: 0.75;
left: 45%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}
body section .xf_right_box {
width: 100%;
height: 20vh;
}
body section .xf_right_box .xf_title {
text-align: center;
font-size: 2rem;
}
body section .xf_right_box .xf_video {
position: absolute;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
width: 13em;
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/xfwlclub/Christmas-Code.git
git@gitee.com:xfwlclub/Christmas-Code.git
xfwlclub
Christmas-Code
圣诞树代码
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385