-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path04_style_student.css
104 lines (86 loc) · 3.31 KB
/
04_style_student.css
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
h1{
text-align: center;
font-size: 100%;
line-height: 120%;
padding: 5% 0;
}
img{
width: auto;
max-width: 100%;
height: auto;
}
header{
background: #405580;
width: 100%;
height: 45px;
position: fixed;
top: 0;
left: 0;
opacity: 0.8;
z-index: 100;
}
nav{
float: right;
padding: 5px 20px 20px 0;
}
nav ul{
list-style: none;
}
.active{
color: #fff;
text-decoration: underline;
}
section p{
font-size: 15px;
}
.clear{
clear: both;
}
footer{
background: #333;
width: 100%;
overflow: hidden;
opacity: 0.9;
}
p{
padding: 1%;
}
footer p, footer h1{
color: #fff;
}
nav ul li{
display: inline-block; /* แสดงผลเป็นแบบ inline-block */
float: left; /* ให้ลอยอยู่ทางซ้าย */
padding: 7px; /* ระยะห่างภายในเป็น 7px */
font-size: 17px; /* ฟอนต์มีขนาด 17px */
}
a{
color: #fff; /*สีข้อความเป็น fff */
text-decoration: none; /*ลิงก์ไม่ต้องมีเส้นใต้ */
font-weight: bold; /* ขนาดของฟอนต์เป็นตัวหนา */
}
body{
background-color: #f0f0f0; /* พื้นหลังสี f0f0f0 */
color: #555; /* สีข้อความเป็น 555 */
margin: 0; /* ระยะห่างภายนอกเป็น 0 */
}
*{ /* ซีเล็กเตอร์อเนกประสงค์ ให้มีการแสดงผลดังนี้ */
margin: 0; /* ระยะห่างภายนอกเป็น 0 */
padding: 0; /* ระยะห่างภายในเป็น 0 */
border: 0; /* กำหนดให้เส้นขอบเป็น 0 */
}
section{ /* แท็ก section ให้มีการแสดงผลดังนี้ */
width: 29%; /* ความกว้างเป็น 29% */
float: left; /* ให้ลอยอยู่ทางซ้าย */
margin: 4% 2%; /* ระยะห่างภายนอกเป็น 4% 2% */
text-align: center; /* ข้อความตัวอักษรอยู่ตำแหน่งตรงกลาง */
font-size: 15px; /* ฟอนต์มีขนาด 15px */
}
.second{ /* class ชื่อ second ให้มีการแสดงผลดังนี้ */
border-top: 1px solid #4d4e50; /* เส้นขอบด้านบนมีขนาด 1 px, เป็นเส้นทึบ, สี 4d4e50 */
text-align: center; /* ตำแหน่งตัวอักษรอยู่ตรงกลาง */
}
a:hover{ /* แท็ก a เมื่อเลื่อนเมาส์มาวางที่ลิงค์แล้วให้มีการแสดงผลดังนี้ */
color: red; /* สีข้อความเป็น red */
text-decoration: underline; /* ลิงก์กำหนดให้มีเส้นใต้ */
}