1 Star 0 Fork 0

xiaolongn10/heart

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
style.css 3.92 KB
一键复制 编辑 原始数据 按行查看 历史
qinzhilong 提交于 2023-09-25 10:25 . beating heart
* {
padding: 0;
margin: 0;
}
body {
background: url(background4.webp) no-repeat center center;
background-size: cover;
height: 100vh;
}
body::after {
content: '';
display: block;
position: absolute;
width: 100%;
height: 100vh;
-webkit-background-color: rgba(0, 0, 0, .5);
background-color: rgba(0, 0, 0, .5);
}
audio,
.love_you {
position: absolute;
left: 50%;
top: 1.5rem;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
z-index: 1809185784;
}
.love_you {
top: 45%;
font-family: Georgia, 'Times New Roman', Times, serif;
font-size: 1.3rem;
font-weight: bold;
color: #ffc0cb;
letter-spacing: .05rem;
-moz-animation: love-xf 1.2s alternate ease-in-out;
-webkit-animation: love-xf 1.2s alternate ease-in-out;
animation: love-xf 1.2s alternate ease-in-out;
user-select: none;
-webkit-text-shadow: 0 0 8px #fff;
text-shadow: 0 0 8px #fff;
}
audio,
.love {
position: absolute;
left: 50%;
top: 1.5rem;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
z-index: 1809185784;
}
.love {
top: 13%;
font-family: Georgia, 'Times New Roman', Times, serif;
font-size: 1.6rem;
font-weight: bold;
color: #ffc0cb;
letter-spacing: .05rem;
-moz-animation: love-xf 1.2s alternate ease-in-out;
-webkit-animation: love-xf 1.2s alternate ease-in-out;
animation: love-xf 1.2s alternate ease-in-out;
user-select: none;
-webkit-text-shadow: 0 0 8px #fff;
text-shadow: 0 0 8px #fff;
}
#canvas {
margin: 0 auto;
}
#pinkboard {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
@media screen and (max-width: 767px) {
#pinkboard {
zoom: 0.7;
}
}
#lovexf {
position: absolute;
width: 100%;
height: 100%;
z-index: 520;
}
@keyframes love-xf {
0% {
opacity: 0.08;
filter: blur(8px);
letter-spacing: .1rem;
}
100% {
opacity: 1;
filter: blur(0);
letter-spacing: .05rem;
}
}
/* 爱心缩放 */
@media screen and (max-width: 450px) {
#lovexf {
/* .5 指的是再原始大小上缩放一半 */
zoom: .7;
/* .3 就是缩放 3/10 */
/* zoom: .3; */
/* 大家自己尝试 */
}
}
#lovexf {
animation: anim 1.5s ease-in-out infinite;
-webkit-animation: anim 1.5s ease-in-out infinite;
-o-animation: anim 1.5s ease-in-out infinite;
-moz-animation: anim 1.5s ease-in-out infinite;
}
@keyframes anim {
0% {
transform: scale(0.8);
}
25% {
transform: scale(0.7);
}
50% {
transform: scale(1);
}
75% {
transform: scale(0.7);
}
100% {
transform: scale(0.8);
}
}
@-webkit-keyframes anim {
0% {
-webkit-transform: scale(0.8);
}
25% {
-webkit-transform: scale(0.7);
}
50% {
-webkit-transform: scale(1);
}
75% {
-webkit-transform: scale(0.7);
}
100% {
-webkit-transform: scale(0.8);
}
}
@-o-keyframes anim {
0% {
-o-transform: scale(0.8);
}
25% {
-o-transform: scale(0.7);
}
50% {
-o-transform: scale(1);
}
75% {
-o-transform: scale(0.7);
}
100% {
-o-transform: scale(0.8);
}
}
@-moz-keyframes anim {
0% {
-moz-transform: scale(0.8);
}
25% {
-moz-transform: scale(0.7);
}
50% {
-moz-transform: scale(1);
}
75% {
-moz-transform: scale(0.7);
}
100% {
-moz-transform: scale(0.8);
}
}
audio {
/* 隐藏 */
/*display: none;*/
/* 透明 */
/* opacity: 0; */
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
HTML
1
https://gitee.com/xiaolongn10/heart.git
git@gitee.com:xiaolongn10/heart.git
xiaolongn10
heart
heart
master

搜索帮助