質問編集履歴
1
タイトルを変更、コードを囲みました。
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
ヘッダー部分を作成したいのですが
|
1
|
+
ヘッダー部分を作成したいのですが画像の上に表示されず要素が隠れてしまうので画像の上に表示させたい。
|
body
CHANGED
@@ -12,65 +12,56 @@
|
|
12
12
|
|
13
13
|
### 該当のソースコード
|
14
14
|
【HTML】
|
15
|
-
<!DOCTYPE html>
|
16
|
-
<html lang="ja">
|
17
|
-
<head>
|
18
|
-
<meta charset="UTF-8">
|
19
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
20
|
-
<link rel="stylesheet" href="css/style.css">
|
21
|
-
<title>Document</title>
|
22
|
-
</head>
|
23
|
-
<body>
|
24
|
-
<div class="background-container">
|
25
|
-
|
26
|
-
<div class="stars"></div>
|
27
|
-
<div class="twinkling"></div>
|
28
|
-
<div class="clouds"></div>
|
29
|
-
</div>
|
30
|
-
</body>
|
31
|
-
</html>
|
32
15
|
|
16
|
+
```<!DOCTYPE html>```
|
17
|
+
|
18
|
+
```<html lang="ja">```
|
19
|
+
```<head>
|
20
|
+
```<meta charset="UTF-8">```
|
21
|
+
```<meta name="viewport" content="width=device-width, initial-scale=1.0">```
|
22
|
+
```<link rel="stylesheet" href="css/style.css">```
|
23
|
+
```<title>Document</title>```
|
24
|
+
</head>```
|
25
|
+
```<body>
|
26
|
+
``` <div class="background-container">
|
27
|
+
```<div class="stars"></div>```
|
28
|
+
```<div class="twinkling"></div>```
|
29
|
+
```<div class="clouds"></div>```
|
30
|
+
</div>```
|
31
|
+
</body>```
|
32
|
+
</html>```
|
33
33
|
【CSS】
|
34
|
-
from {
|
34
|
+
```from {
|
35
|
-
-webkit-transform: translate3d(0px, 0px, 0px);
|
35
|
+
-webkit-transform: translate3d(0px, 0px, 0px);}```
|
36
|
-
}
|
37
|
-
to {
|
36
|
+
```to {
|
38
|
-
-webkit-transform: translate3d(1000px, 0px, 0px);
|
37
|
+
-webkit-transform: translate3d(1000px, 0px, 0px);}```
|
39
|
-
}
|
40
|
-
@-webkit-keyframes move-background {
|
38
|
+
```@-webkit-keyframes move-background {
|
41
|
-
from {
|
39
|
+
```from {
|
42
|
-
-webkit-transform: translate3d(0px, 0px, 0px);
|
40
|
+
-webkit-transform: translate3d(0px, 0px, 0px);}```
|
43
|
-
}
|
44
|
-
to {
|
41
|
+
```to {
|
45
|
-
-webkit-transform: translate3d(1000px, 0px, 0px);
|
42
|
+
-webkit-transform: translate3d(1000px, 0px, 0px);}```
|
46
|
-
}
|
43
|
+
}```
|
47
|
-
}
|
48
|
-
@-moz-keyframes move-background {
|
44
|
+
```@-moz-keyframes move-background {
|
49
|
-
from {
|
45
|
+
```from {
|
50
|
-
-webkit-transform: translate3d(0px, 0px, 0px);
|
46
|
+
-webkit-transform: translate3d(0px, 0px, 0px);}```
|
51
|
-
}
|
52
|
-
to {
|
47
|
+
```to {
|
53
|
-
-webkit-transform: translate3d(1000px, 0px, 0px);
|
48
|
+
-webkit-transform: translate3d(1000px, 0px, 0px);}```
|
54
|
-
}
|
49
|
+
}```
|
55
|
-
}
|
56
|
-
@-webkit-keyframes move-background {
|
50
|
+
```@-webkit-keyframes move-background {
|
57
|
-
from {
|
51
|
+
```from {
|
58
|
-
-webkit-transform: translate3d(0px, 0px, 0px);
|
52
|
+
-webkit-transform: translate3d(0px, 0px, 0px);}```
|
59
|
-
}
|
60
|
-
to {
|
53
|
+
```to {
|
61
|
-
-webkit-transform: translate3d(1000px, 0px, 0px);
|
54
|
+
-webkit-transform: translate3d(1000px, 0px, 0px);}```
|
62
|
-
}
|
55
|
+
}```
|
63
|
-
}
|
64
|
-
.background-container {
|
56
|
+
```.background-container {
|
65
|
-
position: fixed;
|
57
|
+
```position: fixed;```
|
66
|
-
top: 0;
|
58
|
+
```top: 0;```
|
67
|
-
left: 0;
|
59
|
+
```left: 0;```
|
68
|
-
bottom: 0;
|
60
|
+
```bottom: 0;```
|
69
|
-
right: 0;
|
61
|
+
```right: 0;```
|
70
|
-
height: 500px;
|
62
|
+
```height: 500px;```
|
63
|
+
}```
|
71
64
|
|
72
|
-
}
|
73
|
-
|
74
65
|
.stars {
|
75
66
|
background: black url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/stars.png) repeat;
|
76
67
|
position: absolute;
|
@@ -82,47 +73,47 @@
|
|
82
73
|
z-index: 0;
|
83
74
|
}
|
84
75
|
|
85
|
-
.twinkling {
|
76
|
+
```.twinkling {
|
86
|
-
width: 10000px;
|
77
|
+
```width: 10000px;```
|
87
|
-
height: 100%;
|
78
|
+
```height: 100%;```
|
88
|
-
background: transparent url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/twinkling.png") repeat;
|
79
|
+
```background: transparent url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/twinkling.png") repeat;```
|
89
|
-
background-size: 1000px 1000px;
|
80
|
+
```background-size: 1000px 1000px;```
|
90
|
-
position: absolute;
|
81
|
+
```position: absolute;```
|
91
|
-
right: 0;
|
82
|
+
```right: 0;```
|
92
|
-
top: 0;
|
83
|
+
```top: 0;```
|
93
|
-
bottom: 0;
|
84
|
+
```bottom: 0;```
|
94
|
-
z-index: 2;
|
85
|
+
```z-index: 2;```
|
95
|
-
-moz-animation: move-background 70s linear infinite;
|
86
|
+
```-moz-animation: move-background 70s linear infinite;```
|
96
|
-
-ms-animation: move-background 70s linear infinite;
|
87
|
+
```-ms-animation: move-background 70s linear infinite;```
|
97
|
-
-o-animation: move-background 70s linear infinite;
|
88
|
+
```-o-animation: move-background 70s linear infinite;```
|
98
|
-
-webkit-animation: move-background 70s linear infinite;
|
89
|
+
```-webkit-animation: move-background 70s linear infinite;```
|
99
|
-
animation: move-background 70s linear infinite;
|
90
|
+
```animation: move-background 70s linear infinite;```
|
100
|
-
}
|
91
|
+
}```
|
101
92
|
|
102
|
-
.clouds {
|
93
|
+
```.clouds {
|
103
|
-
width: 10000px;
|
94
|
+
```width: 10000px;```
|
104
|
-
height: 100%;
|
95
|
+
```height: 100%;```
|
105
|
-
background: transparent url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/clouds_repeat.png") repeat;
|
96
|
+
```background: transparent url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/clouds_repeat.png") repeat;```
|
106
|
-
background-size: 1000px 1000px;
|
97
|
+
```background-size: 1000px 1000px;```
|
107
|
-
position: absolute;
|
98
|
+
```position: absolute;```
|
108
|
-
right: 0;
|
99
|
+
```right: 0;```
|
109
|
-
top: 0;
|
100
|
+
```top: 0;```
|
110
|
-
bottom: 0;
|
101
|
+
```bottom: 0;```
|
111
|
-
z-index: 3;
|
102
|
+
```z-index: 3;```
|
112
|
-
-moz-animation: move-background 150s linear infinite;
|
103
|
+
```-moz-animation: move-background 150s linear infinite;```
|
113
|
-
-ms-animation: move-background 150s linear infinite;
|
104
|
+
```-ms-animation: move-background 150s linear infinite;```
|
114
|
-
-o-animation: move-background 150s linear infinite;
|
105
|
+
```-o-animation: move-background 150s linear infinite;```
|
115
|
-
-webkit-animation: move-background 150s linear infinite;
|
106
|
+
```-webkit-animation: move-background 150s linear infinite;```
|
116
|
-
animation: move-background 150s linear infinite;
|
107
|
+
```animation: move-background 150s linear infinite;```
|
117
|
-
}
|
108
|
+
}```
|
118
109
|
|
119
|
-
img {
|
110
|
+
```img {
|
120
|
-
height: 70vh;
|
111
|
+
```height: 70vh;```
|
121
|
-
width: 70vh;
|
112
|
+
```width: 70vh;```
|
122
|
-
position: absolute;
|
113
|
+
```position: absolute;```
|
123
|
-
z-index: 3;
|
114
|
+
```z-index: 3;```
|
124
|
-
right: 20px;
|
115
|
+
```right: 20px;```
|
125
|
-
}
|
116
|
+
}```
|
126
117
|
```ここに言語名を入力
|
127
118
|
ソースコード
|
128
119
|
```
|