-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
517 lines (445 loc) · 21.5 KB
/
index.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" radio="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Lecture HTML&CSS</title>
<!-- Add front link, copy from google front -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Kanit:ital,wght@0,100;1,300&display=swap" rel="stylesheet">
</head>
<body>
<!-- ทดลองสร้าง tags (ctrl+?) -->
<h1>header1</h1>
<h2>header2</h2>
<h3>header3</h3>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quisquam, pariatur. Lorem ipsum dolor sit amet
consectetur adipisicing elit. Laboriosam illo, consectetur voluptatum quos at, vel error ab dignissimos
consequuntur a asperiores explicabo sequi rerum obcaecati iusto, enim cum repudiandae eveniet?
</p>
<b>ตัวหนา</b>
<br> <!-- เว้นบรรทัด -->
<i>ตัวเอียง</i>
<br>
<mark>ไฮไลท์</mark>
<br>
<del>ขีดฆ่า</del>
<br>
<ins>ขีดเส้นใต้</ins>
<sub>ตัวห้อย</sub>
<sup>ตัวยก</sup>
<br>
<a title="ไปที่เฟสบุ๊ค" href="http://facebook.com/mooakeja">ข้อความเพื่อกด แทปเดิม</a>
<br>
<a href="http://facebook.com/mooakeja" title="ข้อความเพื่อเมาส์ชี้" target="_blank">ข้อความเพื่อกด เปิดแทปใหม่</a>
<br>
<img src="https://scontent.fbkk5-6.fna.fbcdn.net/v/t1.6435-9/127586056_3457972987626459_4201003849893060750_n.jpg?_nc_cat=101&ccb=1-5&_nc_sid=09cbfe&_nc_eui2=AeGQnNRQo0ezN37qd9G4QToMXv7pPoDJ_M9e_uk-gMn8z_H2YcLw-pwFpHCT3uRHyvybrXLgROoEcQjNGuDToVcW&_nc_ohc=HLCYhQlNUJgAX84lvAZ&_nc_ht=scontent.fbkk5-6.fna&oh=00_AT91dUryy_MhUGYR8M6ExM9nbl8xm4wIQX73hwxPrKVrcw&oe=627E146E"
alt="ข้อความอะไรก็ได้" width="100" height="100">
<br>
<a href="http://facebook.com/mooakeja" target="_blank">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAz1BMVEX////gmV53s9RPXXO5gFHekk/78u2axd71z4e0dkD28Oy9g1JIV2+OlqLgmF3ek1KAiZdMVmt5t9n57eT249Xoto9vstf9+vfrvp3jpHLy1sLsw6T80YHuyKzmrYH03c3iom3inmfns4phhaBRYnnwz7bJilblqnxyqMhVa4LotY746N3z2MWy0uWivL7ly5PxzomCtc6rvrnZyJtolbJrmriqr7i/jGTWk1vRxqG1wLOSuMbHxKe/wq3hypbVx55efpiLo7bWsJTl1MfgyLg73QYOAAALCElEQVR4nN2da3faOBCG4wTT0HSlBttgczUkBNKwbdLLtt1ut2zT//+b1sYYDJZsaXR13w89Pa1J/DDj0Wgkj87OlKvf9teLcRhMoiieOY4zi6NoEoTjxdRv99X/eqVq+4twOcMuToS2clJlf03/0cWzZbjw26ZvFKL2dLhM0XIqmraoLl4Op03CbK+DWWq1SrQT0OT6WbhuAmXfH8YurjEczZzYjUPfNEGl+tM3nLYjUOJgapqDpulcjG5PifEbCyEfQjl4OSQaeqaRjjSIXXl4O0Z3OTCNlas/lmm+IiQe25AReAHGCvAyJWHHtLN6c9nueSLkzk0yKuczzNjWwbdjNJHs9Iea+DLGoXbAAVIXX0jCSO/Y4cVKxocqIRxrfBxDjQ5aYHRDTXy+o9dBD8KOlplHYMSAmXSY8WFmyoCZ8OxBLeDYoAEzIXeskK8fmTVgJhwpy8d9UHFCvhBSFHDMe2guRZ46scFDc+GJdL5+bBNgghhLfhg9Sx7BgxCSmsT52tPQeiEsMd4MXNM4RLnSphsLOwETxMVvDigLcWwvYIIoYWC0GlAGosUumknUUS2NokWJRdS1/YAJ4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QWtWsB60fH2EzaqmjzC1GTRPL2izAvaC5urnbVbQft48PdnNCtqTnaevvlmB++pznI1gVuCzETjOtzAr+PkWv/8ZJRW927BN58x41HNm4vrP0r4d/Kz+xpn1i3pWEIMdqOc9/VR/48z6KXDeE73sdqX6tjl0RbEC29lytHPXOva46XOH4qOMR8NRzs67+qz2tjn0mWxD1rPzaJszrjq/VN41h351iITs5x9Szl67a3VeKrxtdnmd1h3RR9nPsCQnb3etVssGxJfJfZAIec4hJdeHv7SsQPTS2/hC8FG+IzaJ+Wn6o40/i7866W0QADnPAyae6Xy3RfxsctB4/rwFJDgp75nO5AJxa6tO6+ez91K/vOefrU52C4SHcMH/dc3LiHetnTpmlP/6sglx1byeKsIs46plg8qDIcOMgiRCtEE2IF6Vb4s3yuQinfFtHpFgQfjUlRpQDUpKGD1oQErfTDKSchlX6LhwIqLz5e7KhO4ImYwo4NnZgr3Fhhm5gIHwWGO7Ed2xKKDliDIArXZUcRfNRA43Fkg0yBy0dlkbL+gUciWe9u4TshvTQlhgoC/Lq9+7qFkISV5l6Mes7+3rEY6ByXaFJjYhYvpSvYDG1sQbJGcYLMuWeCM5xhTVj2zwVBzJfwQPMu+pyjw014Nj1ozY4SjdAxUYNCNymVeXROQbMyN2lIWYEw2NmBG5XEsvYvJi7QMHwrHezSADpNdVMZI2U2KWTlfV6qAHteeaGJE7N7Ufy5toYETuxORurAfVjAmf+iG+Wl6A1cUcjAMbdtO1h1jJ2IEwHlqzH3KwlO2sCLtL/eNDlbxQpiERRkMb3PNE04kcyMQ754z707Srv55jMUqU4AW24u3kD2MXg2qPCZ0bh7pmD0JqD4IZpy0T0+FZsLYmdDKoPR0usZtg1pgTpX7p4uVw2iS6vdr+IoicFHSLmtNmf03/0cVOFCz8RsIV1G/708U4DCZRFM8SwFkcRZMgHC+mfltl1Wyn/wG5QICcevYKjQAAAABJRU5ErkJggg=="
alt="กดเพื่อเปิดรูป" width="100" height="100">
</a>
<br>
<img src="img/Chrome_icon.png" alt="ทดสอบ" width="100" height="100">
<!-- ======================================================== -->
<!-- กำหนด css เพื่อทำเส้นตาราง -->
<style>
table,
th,
tr {
border: 1px solid black;
border-collapse: collapse;
}
</style>
<table>
<!-- tr = table row -->
<!-- th = table head -->
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<th>Akekapong</th>
<th>Kongsavat</th>
<th>30</th>
</tr>
</table>
<br>
<!-- css กำหนด list -->
<style>
ul {
list-style-type: square;
/* circul, none, ...*/
}
</style>
<ul>
<li>ทดสอบ 1</li>
<li>ทดสอบ 2</li>
<li>ทดสอบ 3</li>
<li>ทดสอบ 4</li>
<li>ทดสอบ 5</li>
</ul>
<br>
<ol>
<li>ทดสอบ 1</li>
<li>ทดสอบ 2</li>
<li>ทดสอบ 3</li>
<li>ทดสอบ 4</li>
<li>ทดสอบ 5</li>
</ol>
<br>
<!-- ======================================================== -->
<!-- การใช้งาน Input แบบต่างๆ -->
<form action="">
<fieldset>
<legend>
Register Form
</legend>
<label for="firstname">Firstname</label>
<input type="text" placeholder="Enter your Firstname">
<br>
<label for="Lastname">Lastname</label>
<input type="text" placeholder="Enter your Lastname">
<br>
<label for="gender">Select gender</label>
<input type="radio" name="gender" value="male" checked>Male
<input type="radio" name="gender" value="female">Female
<br>
<label for="sport">Check Sport your can play?</label>
<br>
<input type="checkbox" name="checkbox1" value="checkbox1">checkbox 1
<input type="checkbox" name="checkbox2" value="checkbox2">checkbox 2
<input type="checkbox" name="checkbox3" value="checkbox3">checkbox 3
<input type="checkbox" name="checkbox4" value="checkbox4">checkbox 4
<br>
<input type="submit" value="submit"> กดเพื่อเปิดส่ง (หลัง tag ใ่ส่ข้อความอะไีรก็ได้ เพื่ออธิบายเฉยๆ)
</fieldset>
</form>
<br>
<!-- ======================================================== -->
<!-- CSS TEST Block/In-line Element -->
<style>
.element_div {
background-color: red;
}
.element_a {
background-color: black;
color: aliceblue;
}
</style>
<!-- Block Element -->
<div class="element_div">
This is a Block Element
</div>
<!-- In-line Element -->
<a class="element_a" href="#">This is an In-Line Element</a>
<a class="element_a" href="#">This is an In-Line Element</a>
<a class="element_a" href="#">This is an In-Line Element</a>
<a class="element_a" href="#">This is an In-Line Element</a>
<a class="element_a" href="#">This is an In-Line Element</a>
<!-- Class and ID with CSS -->
<style>
.box {
background-color: black;
color: white;
margin: 10px;
/* ระยะรอบคัว */
padding: 20px;
}
.center {
text-align: center;
}
#myID {
background-color: blueviolet;
width: 200px;
height: 20rem;
}
</style>
<div class="box">
<h2>This is a Box 1</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ratione, magni.</p>
</div>
<!-- Mutuple Class -->
<div class="box center">
<h2>This is a Box 2</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ratione, magni.</p>
</div>
<div class="box" id="myID">
<h2>This is a Box 3</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Ratione, magni.</p>
</div>
<p class="box">
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Blanditiis rem ex nostrum maiores libero unde
necessitatibus. Officiis mollitia, aut repellat quasi voluptatum quisquam quaerat. Architecto veniam officiis
tempore. Quos sapiente eum tempore pariatur nihil! Id commodi ad fuga unde non doloribus cumque expedita
quibusdam blanditiis nemo explicabo doloremque debitis atque tenetur facere ex aliquid, excepturi quisquam!
Modi, id. Accusantium odit corporis inventore unde repudiandae vitae ab, hic amet soluta vero possimus, quas
veniam laudantium sed laborum! Maiores illo provident tempora tenetur distinctio et nemo ex eius voluptas, quae
ab quo quod inventore corporis cum sapiente libero rem blanditiis! Libero, dolores!
</p>
<iframe width="560" height="315" src="https://www.youtube.com/embed/vHQ9QlEc0Os" title="YouTube video player"
frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
<!-- ======================================================== -->
<!-- 3 way to write CSS -->
<!-- [1] -->
<div style="width: 300px; height: 150px; background-color: red;">
1. In-line style
</div>
<!-- [2] -->
<div class="internal">
2. Internal style
</div>
<style>
.internal {
background-color: blue;
width: 300px;
height: 150px;
color: aliceblue;
/*front color*/
}
</style>
<!-- [3] -->
<link rel="stylesheet" href="style.css">
<div id="external">
3. external style
</div>
<!-- ======================================================== -->
<!-- การใช้งาน Front -->
<div id="fonttest">
<h1>Test Front from Google Font</h1>
<p>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Ab quia provident voluptatibus corporis accusamus
consectetur saepe similique a corrupti odit tempore amet, dolorem modi cum nam dignissimos libero molestias
expedita omnis, quae praesentium quasi. Explicabo voluptatibus eveniet harum assumenda eum ipsum fugiat ipsa
earum, odio reprehenderit facilis. Accusantium vel quae sed dicta sapiente, iure debitis porro placeat
reprehenderit tenetur similique quas distinctio alias id nulla perspiciatis repellat numquam? Eius esse
veritatis ipsa, deserunt necessitatibus quam repellendus illum dignissimos debitis ipsum aperiam dolor aut
architecto molestiae consectetur qui facere, in officiis alias rem placeat nam. Laboriosam commodi est
cumque eos labore?
</p>
</div>
<!-- ======================================================== -->
<!-- การใส่รูปภาพ -->
<div id="img-test">
ใส่พื้นหลังให้ block
</div>
<!-- ======================================================== -->
<!-- การกำหนด ฺฺ Block / Inline Element ได้โดยการใช้ display -->
<div id="testblock">This is a Block Element</div>
<div id="testblock" class="change2">This is a Block Element</div>
<span class="visibility">This is an In-line Element</span>
<span id="testinline">This is an In-line Element</span>
<span id="testinline" class="change1">This is an In-line Element</span>
<span id="testinline">This is an In-line Element</span>
<style>
#testblock {
background-color: brown;
}
#testinline {
background-color: chartreuse;
}
.change1 {
display: block;
}
.change2 {
display: inline;
}
.visibility {
visibility: hidden;
/* hidden ซ่อนการมองเห็น แต่จะเว้นช่องว่างบล็อกไว้ ไม่เหมือน display:none */
}
</style>
<!-- ======================================================== -->
<!-- การกำหนดความกว้างบล็อกด้วย max-width -->
<div class="ex1">Use Width</div>
<div class="ex2">Use Max-Width</div>
<style>
.ex1 {
width: 1000px;
border: 2px solid green;
}
.ex2 {
max-width: 1000px;
border: 2px solid black;
}
</style>
<!-- ======================================================== -->
<!-- การกำหนด CSS position 5 แบบ -->
<div class="position_test">
1. Test CSS Position_static (default)
</div>
<div class="position_test" id="relative">
2. Test CSS Position_relative
</div>
<div class="position_test" id="fixed">
3. Test CSS Position_fixed
</div>
<div class="position_test" id="sticky">
5. Test CSS Position_sticky
</div>
<div class="position_test" id="parent_box">
4. Test CSS Position_absolute <br>
This is a Parent Box
<div class="position_test" id="child_box">
This is a Child Box
</div>
</div>
<br>
<br>
<br>
<br>
<style>
.position_test {
width: 300px;
height: 20px;
border: 2px solid green;
}
#relative {
/* position: static; this is a default ปรับ บนล่างซ้ายขวา ไม่ได้ */
position: relative;
/*ยอมให้ขยับได้ ตามที่ปรับ*/
top: 50px;
/*ดันจาก บน ไป ล่าง*/
right: 10px;
/*ดันจาก ขวา ไป ซ้าย*/
bottom: 10px;
/*ดันจาก ล่าง ไป บน*/
left: 10px;
/*ดันจาก ซ้าย ไป ขวา*/
}
#fixed {
position: fixed;
bottom: 0px;
right: 0px;
}
#sticky {
position: sticky;
bottom: 0px;
right: 0px;
}
#parent_box {
width: 500px;
height: 100px;
position: relative;
top: 50px;
left: 100px;
}
#child_box {
width: 100px;
height: 50px;
border: 4px solid red;
position: absolute;
bottom: -10px;
left: 50%;
background-color: aqua;
z-index: -1;
/* z-index [1=อยู่บน] [-1=อยู่ล่าง] */
}
</style>
<!-- ======================================================== -->
<!-- การจัดการ Text Over flow ข้อความล้นกรอบ-->
<div class="overflow_test">
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Iste voluptas neque nemo dicta suscipit unde deserunt
praesentium iusto aut, vel minus nesciunt! Aspernatur, ab cumque atque repellendus iusto nobis, vel itaque
dolore vero doloribus numquam magni minima! Accusantium eligendi odio libero veritatis recusandae ratione eos
rerum at necessitatibus, asperiores sapiente doloribus temporibus saepe quibusdam, eum quod hic consequuntur
aspernatur quia, ad iusto rem. Aspernatur totam sunt aut a quos laborum quas? Delectus nihil possimus provident
eius optio odit impedit sint. Perspiciatis animi aspernatur consectetur in id officiis repudiandae sit facilis
quo impedit illo nemo aperiam deleniti quidem architecto, suscipit voluptas.
</div>
<style>
.overflow_test {
width: 300px;
height: 150px;
border: 4px solid green;
/* overflow: visible;
overflow: scroll; */
overflow: auto;
}
</style>
<!-- ============================================== -->
<!-- CSS Combinators -->
<div>
<p>How to use Combinator</p>
<p>How to use Combinator</p>
<section>How to use Combinator
<p>How to use Combinator in Sector tag</p>
</section>
<p>How to use Combinator</p>
<p>How to use Combinator</p>
</div>
<p>How to use Combinator</p>
<p>How to use Combinator</p>
<style>
/* 1. Descendant selector(space) */
/* div p {
background-color: yellow;
} */
/* 2. Child selector(>) */
/* div > p {
background-color: yellow;
} */
/* 3. Adjacent Sibling Selector(+) */
/* div + p {
background-color: yellow;
} */
/* 4. General Sibling Selector (AหนอนB) */
div~p {
background-color: yellow;
}
</style>
<!-- =================================================== -->
<!-- Pseudo Classes -->
<div class="pseudo_hover"></div>
<p class="pseudo_first-line">
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Nostrum sint itaque molestias eum dignissimos quia
ipsam mollitia alias iusto fugit! Qui laborum deserunt atque repudiandae nobis odio. Quam, soluta quis!
</p>
<p class="psuedo_text">
Something
</p>
<style>
.pseudo_hover {
width: 100px;
height: 100px;
background-color: black;
}
/* 1. :hover เอาเมาส์ไปชี้ */
.pseudo_hover:hover {
background-color: red;
}
/* 2. ::first-line */
.pseudo_first-line::first-line {
font-size: 46px;
}
/* 3. ::before */
.psuedo_text::before {
content: "This from Before Psuedo";
}
/* 4. ::after */
.psuedo_text::after {
content: "This from After Psuedo";
}
</style>
<!-- ======================================================== -->
<div class="sizing">Some Box</div>
<style>
.sizing {
width: 150px;
height: 150px;
border: 2px solid #000;
padding: 20px;
/* F12 ดู div.sizing = 194x194 px */
box-sizing: border-box;
/* F12 ดู div.sizing = 150x150 px */
}
</style>
</body>
</html>