Swiper 캐러셀을 HTML 에 삽입
요구 사항:
- 캐러셀의 콘텐츠를 담을 HTML 내의 구조적 위치.
- 탐색을 위한 페이지네이션 요소.
기능:
- 스타일을 지정하고 상호 작용할 수 있는 캐러셀 레이아웃을 임베딩합니다.
단계:
index.html 의 <body> 태그 내에 다음을 추가합니다.
<section>
<div class="content">
<div class="swiper">
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="card">
<h1>Cosmic Ballet</h1>
<p>
The universe is not just a vast expanse of darkness; it's a
dynamic stage of cosmic ballet. Galaxies dance, stars are born
and die, and black holes roam, all governed by the timeless
rhythm of gravitational forces.
</p>
<button class="read-more">Read More</button>
</div>
</div>
<div class="swiper-slide">
<div class="card">
<h1>Dark Secrets</h1>
<p>
For all its luminous stars and galaxies, the universe hides more
than it reveals. Dark matter and dark energy, invisible and
mysterious, make up 95% of the universe, holding the cosmos
together and driving its expansion.
</p>
<button class="read-more">Read More</button>
</div>
</div>
<div class="swiper-slide">
<div class="card">
<h1>Time's Relativity</h1>
<p>
In the vast cosmos, time is relative. Near massive objects like
black holes, time seems to slow down. What feels like minutes
there could equate to years elsewhere, making the universe a
theater of time's elasticity.
</p>
<button class="read-more">Read More</button>
</div>
</div>
</div>
<!-- Add Pagination -->
<div class="swiper-pagination"></div>
</div>
</div>
</div>
</section>