1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
<p>
<title>안녕하세요 하루에 3분</title>
<link rel="stylesheet" href="https://unpkg.com/swiper/swiper-bundle.min.css">
<style>
#header.header {}
#header.header .menu {border-bottom:1px solid #000; padding:20px; text-align: center;}
#header.header .menu .menuItem {display:inline-block;}
#contents.contents {}
#contents.contents .swiper-container {height:300px;}
#footer.footer {border-top:1px solid #000; padding:40px; text-align: center}
</style>
</p>
src="https://code.jquery.com/jquery-3.5.1.min.js">
< br >
>
src="https://unpkg.com/swiper/swiper-bundle.min.js">
< br >
>
src="https://kit.fontawesome.com/d95f0bdab8.js" crossorigin="anonymous">
< br >
>
<div id="header" class="header">
<div class="menu">
<div class="menuItem"><i class="fas fa-home" aria-hidden="true"></i> 메인</div>
<div class="menuItem"><i class="fas fa-clipboard-list" aria-hidden="true"></i> 게시판</div>
<div class="menuItem"><i class="fas fa-flag" aria-hidden="true"></i> 공지사항</div>
</div>
</div>
<div id="contents" class="contents">
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide" style="background-image:url('https://image.chosun.com/sitedata/image/202006/05/2020060500702_0.png')">Slide 1</div>
<div class="swiper-slide" style="background-image:url('https://news.hmgjournal.com/images_n/contents/190806_hack02.png'">Slide 2</div>
<div class="swiper-slide" style="background-image:url('https://img.etnews.com/photonews/1912/1256054_20191223184026_970_0001.jpg'">Slide 3</div>
...
</div>
<div class="swiper-pagination"><br></div>
<div class="swiper-button-prev"><br></div>
<div class="swiper-button-next"><br></div>
</div>
<div class="subContents recent">
<br>
</div>
<div class="subContents best">
<br>
</div>
<div class="subContents notice">
<br>
</div>
</div>
<div id="footer" class="footer">
ⓒ 청일TV
</div>
>
var mySwiper = new Swiper(".swiper-container", {
// Optional parameters
loop: true,
// If we need pagination
pagination: {
el: ".swiper-pagination",
},
// Navigation arrows
navigation: {
nextEl: ".swiper-button-next",
prevEl: ".swiper-button-prev",
}
})
>
Colored by Color Scripter
|
cs |