cc.html

    1. <!DOCTYPE html>
    2. <html lang="en">
    3. <head>
    4. <meta charset="UTF-8">
    5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
    6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
    7. <link rel="stylesheet" href="style.css">
    8. <title>Charge</title>
    9. </head>
    10. <body>
    11. <section><span></span></section>
    12. </body>
    13. </html>

    style.css

    1. html, body {
    2. margin: 0;
    3. height: 100%;
    4. }
    5. body {
    6. display: flex;
    7. justify-content: center;
    8. align-items: center;
    9. background: #ed556a;
    10. }
    11. section {
    12. width: 650px;
    13. height: 300px;
    14. padding: 10px;
    15. position: relative;
    16. display: flex;
    17. align-items: center;
    18. justify-content: center;
    19. border: 2px solid white;
    20. }
    21. span {
    22. width: 48px;
    23. height: 96px;
    24. display: inline-block;
    25. position: relative;
    26. color: white;
    27. border: 3px solid;
    28. animation: loading 2s linear infinite alternate;
    29. }
    30. span::before {
    31. content: '';
    32. position: absolute;
    33. top: -15px;
    34. left: 6px;
    35. width: 36px;
    36. height: 12px;
    37. background-color: white;
    38. }
    39. @keyframes loading {
    40. 0% {
    41. box-shadow: 0 0 inset
    42. }
    43. 100% {
    44. box-shadow: 0 -96px inset
    45. }
    46. }

    image.png