-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.html
97 lines (80 loc) · 2.37 KB
/
test.html
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
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document 한글사용에 관하여</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<script src="test.js"></script>
<style>
.tit{
text-align: center;
}
.book{
display: flex;
}
.book>div{
flex: 1;
padding: 50px;
}
.part1{
background-color: #ffdaf3;
}
.part2{
background-color: #deffda;
}
.v-enter-active,
.v-leave-active {
transition: opacity 1s;
}
/* opacity:0에서 1까지 페이드인&페이드아웃하기 */
.v-enter,
.v-leave-to {
opacity: 0;
}
</style>
</head>
<body>
<h1 class="tit">Vue JS 기초편</h1>
<div class="book">
<!-- ************* Vue.js 기본기능 ************** -->
<div class="part1">
<h2>1. 텍스트 바인딩</h2>
<div id="app1">
<p>{{ message }}</p>
</div>
<h2>2. 반복 렌더링</h2>
<div id="app2">
<ol>
<li v-for="item in list">{{ item }}</li>
</ol>
</div>
<h2>3. 이벤트 사용하기</h2>
<div id="app3">
<button v-on:click="handleClick">Click</button>
</div>
<h2>4. 입력 양식과 동기화하기</h2>
<div id="app4">
<input v-model="message">
<p>{{ message }}</p>
</div>
<h2>5. 조건 분기</h2>
<div id="app5">
<button v-on:click="show=!show">변경하기</button>
<p v-if="show">Hello Vue.js!</p>
</div>
<h2>6. 트랜지션과 애니메이션</h2>
<div id="app6">
<button v-on:click="show=!show">변경하기</button>
<transition>
<p v-if="show">Hello Vue.js!</p>
</transition>
</div>
</div>
<!-- ************* ************** -->
<div class="part2">
</div>
</div>
</body>
</html>