全部代码和效果如下
<!DOCTYPE html>
<html>
<head>
<title>加载效果</title>
<style type="text/css">
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
display: flex;
flex-flow: column;
align-items: center;
justify-content: center;
}
.loading {
width: 100px;
height: 100px;
border-radius: 50%;
border: 5px solid #BEBEBE;
border-left: 5px solid #498aca;
animation: load 1s linear infinite;
}
@keyframes load {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div class="loading"></div>
</body>
</html>