개발개발12

페이지 로딩 애니메이션

· 2023-12-28 (목) 19:16:51 · 1499

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
  body, html {
    height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
  }

  .container {
    width: 1920px;
    height: 1080px;
    position: relative;
    overflow: hidden;
  }

  .divCover {
    width: 100%;
    height: 100%;
    background-size: cover; /* Cover ensures the background image covers the entire div */
    position: absolute;
    clip-path: circle(0% at 50% 50%);
    animation: OpeningAnimation 3s forwards;
  }

  @keyframes OpeningAnimation {
    to {
      clip-path: circle(75% at 50% 50%);
    }
  }
</style>
</head>
<body>
<div class="container">
  <div class="divCover"><video loop playsinline autoplay muted="muted" src="1.mp4"></video></div> <!-- This div will reveal the content -->
</div>

</body>
</html>

 

 

특정 사이트에서 동작하는 애니메이션 보고 인상적이어서 비슷하게 작업해 봤습니다.

동영상 대신 이미지 교체해도 좋습니다.


역동적이지는 않아서 좀 아쉽지만

처음 페이지 로딩때 활용하면 괜찮을 것 같습니다

|
댓글을 작성하시려면 로그인이 필요합니다.

개발자팁

5,403건

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
PHP 24-06-30 조회 1,269
jQuery 24-06-19 조회 1,311
PHP 24-05-27 조회 1,737
Mobile 24-05-21 조회 1,419
기타 24-05-11 조회 1,256
23-10-30 조회 4,519
기타 23-10-24 조회 2,700
23-12-19 조회 1,701
24-01-10 조회 1,711
24-01-10 조회 1,712
24-01-15 조회 1,469
24-02-09 조회 5,124
24-02-16 조회 2,528
24-02-16 조회 4,227
24-02-18 조회 4,516
24-02-22 조회 3,302
24-02-25 조회 4,397
24-03-09 조회 3,092
JavaScript 24-02-26 조회 1,467
OS 24-02-25 조회 1,519
PHP 24-02-23 조회 1,674
PHP 24-02-18 조회 1,573
PHP 24-02-17 조회 1,477
PHP 24-02-16 조회 1,634
PHP 24-02-05 조회 1,637
JavaScript 24-01-28 조회 1,466
PHP 24-01-28 조회 1,437
PHP 24-01-27 조회 1,407
PHP 24-01-27 조회 2,650
PHP 24-01-27 조회 1,501