質問編集履歴
1
コードの修正と具体的な説明の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -3,6 +3,16 @@
|
|
3
3
|
z-indexもためしたのですが、positionがabsoluteだとfloatと同じく通常の要素の重ね順からは外れてしまうようで、ききませんでした。
|
4
4
|
|
5
5
|
お知恵をおかしいただけると幸いです。よろしくお願いします。
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
追記しました。
|
10
|
+
|
11
|
+
例えばposが画面全体にあり、nonposが後ろから透けているということしたいです。
|
12
|
+
|
13
|
+
今のままだとposがposition: 'absolute'で前にきて重なる感じになると思います。
|
14
|
+
|
15
|
+
これを、position: 'absolute';を指定しながらnonposの後ろに重なるようにしたいです。
|
6
16
|
|
7
17
|
|
8
18
|
|
@@ -22,9 +32,37 @@
|
|
22
32
|
|
23
33
|
```CSS
|
24
34
|
|
35
|
+
.container{
|
36
|
+
|
37
|
+
width: 100%;
|
38
|
+
|
39
|
+
height: 100%;
|
40
|
+
|
41
|
+
}
|
42
|
+
|
25
43
|
.pos{
|
26
44
|
|
27
|
-
position: 'absolute'
|
45
|
+
position: 'absolute';
|
46
|
+
|
47
|
+
background-color: red;
|
48
|
+
|
49
|
+
width: 100%;
|
50
|
+
|
51
|
+
opacity: 0.5;
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
.nonpos{
|
56
|
+
|
57
|
+
position: 'absolute';
|
58
|
+
|
59
|
+
background-color: blue;
|
60
|
+
|
61
|
+
width: 50px;
|
62
|
+
|
63
|
+
height: 50px;
|
64
|
+
|
65
|
+
border-radius: 25px;
|
28
66
|
|
29
67
|
}
|
30
68
|
|