質問編集履歴
1
HTMLとCSSを別々にコード
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,31 +16,143 @@
|
|
16
16
|
|
17
17
|
そこで、私は下記のようなコードを書きました。
|
18
18
|
|
19
|
+
HTML
|
20
|
+
|
19
21
|
```ここに言語を入力
|
20
22
|
|
21
|
-
<div style="
|
23
|
+
<div style="" class="main_div">
|
22
24
|
|
23
|
-
<
|
25
|
+
<a style="" class="title" id="">A</a><br>
|
24
26
|
|
25
|
-
|
27
|
+
<div style="" class="sub_div">
|
26
28
|
|
27
|
-
<a style="
|
29
|
+
<a style="" class="sub_font" id="">a</a><br>
|
28
30
|
|
29
|
-
<a style="
|
31
|
+
<a style="" class="sub_font" id="">b</a><br>
|
30
32
|
|
31
|
-
|
33
|
+
<a style="" class="sub_font" id="">c</a><br>
|
32
34
|
|
33
|
-
<a style="text-align: center; color: black; font-size: 20px; width: 90%; font-weight: bold; text-shadow: 5px 5px 1px #999999;" class="fade-in">e</a><br><br>
|
34
|
-
|
35
|
-
<a style="
|
35
|
+
<a style="" class="sub_font" id="">d</a><br>
|
36
|
-
|
37
|
-
<a style="text-align: center; color: black; font-size: 20px; width: 90%; font-weight: bold; text-shadow: 5px 5px 1px #999999;" class="fade-in">g</a>
|
38
|
-
|
39
|
-
<a style="text-align: center; color: black; font-size: 20px; width: 90%; font-weight: bold; text-shadow: 5px 5px 1px #999999;" class="fade-in">h</a><br>
|
40
36
|
|
41
37
|
</div>
|
42
38
|
|
43
39
|
</div>
|
40
|
+
|
41
|
+
```
|
42
|
+
|
43
|
+
CSS
|
44
|
+
|
45
|
+
```ここに言語を入力
|
46
|
+
|
47
|
+
.main_div
|
48
|
+
|
49
|
+
{
|
50
|
+
|
51
|
+
width: 100%;
|
52
|
+
|
53
|
+
height: 100vh;
|
54
|
+
|
55
|
+
color: white;
|
56
|
+
|
57
|
+
background-color: white;
|
58
|
+
|
59
|
+
display: flex;
|
60
|
+
|
61
|
+
-js-display: flex;
|
62
|
+
|
63
|
+
align-items: center;
|
64
|
+
|
65
|
+
justify-content: center;
|
66
|
+
|
67
|
+
flex-direction: column;
|
68
|
+
|
69
|
+
position: relative;
|
70
|
+
|
71
|
+
margin-left:auto;
|
72
|
+
|
73
|
+
margin-right:auto;
|
74
|
+
|
75
|
+
}
|
76
|
+
|
77
|
+
.title
|
78
|
+
|
79
|
+
{
|
80
|
+
|
81
|
+
text-align: center;
|
82
|
+
|
83
|
+
color: black;
|
84
|
+
|
85
|
+
font-size: 50px;
|
86
|
+
|
87
|
+
width: 90%;
|
88
|
+
|
89
|
+
margin-top: 1000px;
|
90
|
+
|
91
|
+
}
|
92
|
+
|
93
|
+
.sub_div
|
94
|
+
|
95
|
+
{
|
96
|
+
|
97
|
+
width: 85%;
|
98
|
+
|
99
|
+
height: 75%;
|
100
|
+
|
101
|
+
background-color: #D8DE3C;
|
102
|
+
|
103
|
+
border-radius: 90px;
|
104
|
+
|
105
|
+
text-align: center;
|
106
|
+
|
107
|
+
-webkit-align-items: center;
|
108
|
+
|
109
|
+
align-items: center;
|
110
|
+
|
111
|
+
-webkit-justify-content: center;
|
112
|
+
|
113
|
+
justify-content: center;
|
114
|
+
|
115
|
+
position: relative;
|
116
|
+
|
117
|
+
display: flex;
|
118
|
+
|
119
|
+
justify-content: center;
|
120
|
+
|
121
|
+
align-items: center;
|
122
|
+
|
123
|
+
}
|
124
|
+
|
125
|
+
.sub_font
|
126
|
+
|
127
|
+
{
|
128
|
+
|
129
|
+
text-align: center;
|
130
|
+
|
131
|
+
color: black;
|
132
|
+
|
133
|
+
font-size: 25px;
|
134
|
+
|
135
|
+
width: 70%;
|
136
|
+
|
137
|
+
-webkit-transform: translateY(-50%);
|
138
|
+
|
139
|
+
-ms-transform: translateY(-50%);
|
140
|
+
|
141
|
+
transform: translateY(-50%);
|
142
|
+
|
143
|
+
position: relative;
|
144
|
+
|
145
|
+
margin-right:auto;
|
146
|
+
|
147
|
+
margin-left:auto;
|
148
|
+
|
149
|
+
display: flex;
|
150
|
+
|
151
|
+
justify-content: center;
|
152
|
+
|
153
|
+
align-items: center;
|
154
|
+
|
155
|
+
}
|
44
156
|
|
45
157
|
```
|
46
158
|
|