回答編集履歴
3
情報の追加。
test
CHANGED
@@ -15,3 +15,57 @@
|
|
15
15
|
`postion: relative;` ⇒ `position: relative;`
|
16
16
|
|
17
17
|
`positon: absolute;` ⇒ `position: absolute;` です。
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
---
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
こう書いたほうが見やすいかも。(不要な要素を削除しています)
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
```HTML
|
30
|
+
|
31
|
+
<div id="fade">
|
32
|
+
|
33
|
+
<div id="box"></div>
|
34
|
+
|
35
|
+
</div>
|
36
|
+
|
37
|
+
```
|
38
|
+
|
39
|
+
```CSS
|
40
|
+
|
41
|
+
#fade {
|
42
|
+
|
43
|
+
background-color: rgba( 0, 0, 0, .5 );
|
44
|
+
|
45
|
+
height:100%;
|
46
|
+
|
47
|
+
position: relative;
|
48
|
+
|
49
|
+
}
|
50
|
+
|
51
|
+
#box {
|
52
|
+
|
53
|
+
border-radius: 35px;
|
54
|
+
|
55
|
+
border: 3px solid gray;
|
56
|
+
|
57
|
+
height:75%;
|
58
|
+
|
59
|
+
margin: 0 auto;
|
60
|
+
|
61
|
+
position: absolute;
|
62
|
+
|
63
|
+
text-aling: center;
|
64
|
+
|
65
|
+
top: 10px;
|
66
|
+
|
67
|
+
width: 40%;
|
68
|
+
|
69
|
+
}
|
70
|
+
|
71
|
+
```
|
2
補足の追加。
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
```HTML
|
2
2
|
|
3
|
-
<div id="fade" style="postion: relative; top:0px; left:0px; width:100%; height:100%; opacity:0.5; background-color:#000000;">
|
3
|
+
<div id="fade" style="position: relative; top:0px; left:0px; width:100%; height:100%; opacity:0.5; background-color:#000000;">
|
4
4
|
|
5
5
|
<div id="box" style="position: absolute; text-aling: center; margin-left:auto; margin-right:auto; top:10px; height:75%; width: 40%; border: 3px solid gray; border-radius: 35px;"></div>
|
6
6
|
|
@@ -12,4 +12,6 @@
|
|
12
12
|
|
13
13
|
あと、
|
14
14
|
|
15
|
+
`postion: relative;` ⇒ `position: relative;`
|
16
|
+
|
15
17
|
`positon: absolute;` ⇒ `position: absolute;` です。
|
1
ミスがあったため修正。
test
CHANGED
@@ -2,10 +2,14 @@
|
|
2
2
|
|
3
3
|
<div id="fade" style="postion: relative; top:0px; left:0px; width:100%; height:100%; opacity:0.5; background-color:#000000;">
|
4
4
|
|
5
|
-
<div id="box" style="positon: absolute; text-aling: center; margin-left:auto; margin-right:auto; top:10px; height:75%; width: 40%; border: 3px solid gray; border-radius: 35px;"></div>
|
5
|
+
<div id="box" style="position: absolute; text-aling: center; margin-left:auto; margin-right:auto; top:10px; height:75%; width: 40%; border: 3px solid gray; border-radius: 35px;"></div>
|
6
6
|
|
7
7
|
</div>
|
8
8
|
|
9
9
|
```
|
10
10
|
|
11
11
|
こうすればよいのでは?
|
12
|
+
|
13
|
+
あと、
|
14
|
+
|
15
|
+
`positon: absolute;` ⇒ `position: absolute;` です。
|