<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css" type="text/css" media="all">
<title>loading</title>
</head>
<body>
<div class="loading"></div>
</body>
</html>
HTML
格式化
支持Emmet,输入 p 后按 Tab键试试吧!
<head> ... </head>
<body>
</body>
CSS
格式化
body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #0a0020;
perspective: 200px;
}
.loading {
width: 100px;
height: 100px;
background-color: rgba(16, 134, 231, 0.801);
border-radius: 12px;
animation: loading 2s linear infinite;
}
@keyframes loading {
0% { transform: rotateX(0deg) rotateY(0deg); }
50% { transform: rotateX(0deg) rotateY(180deg); }
100% { transform: rotateX(180deg) rotateY(180deg); }
}
JS
格式化