简单介绍
主页动态雨滴玻璃掉落效果重构:全新CSS布局与canvas下雨背景绘制。用户可自由更换背景图片,为网页带来丰富多彩的视觉体验。
源码展示
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script type="text/javascript" src="/static/pixi.min.js"></script>
<script type="text/javascript" src="/static/main.js"></script>
<link rel="stylesheet" href="/static/font.css">
<title>xiio</title>
<style>
canvas {
display: block;
position: fixed;
top: 0;
left: 0;
z-index: -2;
pointer-events: none
}
a:hover,
a:link,
a:visited,
a:active,
a:focus {
text-decoration: none;
}
button,
input,
input:focus {
outline: none;
border: none;
}
a,
button,
input {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
*{
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* 其他浏览器 */
}
* {
box-sizing: border-box;
-webkit-text-size-adjust: none
}
img {
border: 0;
vertical-align: middle
}
body {
margin: 0;
padding: 0;
border: 0;
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
width: 100vw;
background: radial-gradient(#619bff, #e0e0e3);
}
.main {
width: 35%;
display: flex;
flex-direction: column;
align-items: center;
}
@media screen and (max-width:1024px) {
.main {
width: 45%;
}
}
@media screen and (max-width:768px) {
.main {
width: 50%;
}
}
@media screen and (max-width:540px) {
.main {
width: 60% !important;
}
}
@media screen and (max-width:480px) {