質問編集履歴
1
デモサイト削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,231 +1,114 @@
|
|
1
1
|
現在パララックスサイトを制作しておりますが、スマートフォンで確認すると背景画像がスクロールした時にヘッダーとフッターが縮小することにより、背景に敷いている画像が拡大してしまいます。
|
2
|
-
|
3
2
|
こちらを解消したいのですが、なかなかcssで解消できずに困っております。
|
4
|
-
|
5
3
|
こちらはcss3で直せるのかJSで直せるのかわかる方いらっしゃいましたらご教授いただけませんでしょうか。
|
6
|
-
|
7
4
|
ご協力のほど何卒よろしくお願い致します。
|
8
|
-
|
9
|
-
|
10
5
|
|
11
6
|
-----
|
12
7
|
|
13
|
-
|
14
|
-
|
15
8
|
パララックスデモサイト
|
16
|
-
|
17
|
-
|
9
|
+
URL削除しました。ご協力ありがとうございました!
|
18
|
-
|
19
|
-
ID: test
|
20
|
-
|
21
|
-
PW: test
|
22
|
-
|
23
|
-
|
24
10
|
|
25
11
|
-----
|
26
12
|
|
13
|
+
```ここに言語を入力
|
14
|
+
|
15
|
+
<!doctype html>
|
16
|
+
<html>
|
17
|
+
<head>
|
18
|
+
<meta charset="UTF-8">
|
19
|
+
<title>parallax demo</title>
|
20
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
21
|
+
<style>
|
22
|
+
html,body {
|
23
|
+
width: 100%;
|
24
|
+
height: 100%;
|
25
|
+
}
|
26
|
+
body {
|
27
|
+
margin: 0;
|
28
|
+
padding: 0;
|
29
|
+
}
|
30
|
+
img {
|
31
|
+
width: 100%;
|
32
|
+
height: auto;
|
33
|
+
}
|
34
|
+
p {
|
35
|
+
margin: 0;
|
36
|
+
padding: 0;
|
37
|
+
line-height: 1.5;
|
38
|
+
}
|
27
39
|
|
28
40
|
|
41
|
+
/* ============================================================== */
|
29
|
-
|
42
|
+
/* ======================== 824px以下 =========================== */
|
43
|
+
/* ============================================================ */
|
30
44
|
|
45
|
+
@media screen and (max-width:824px) {
|
31
46
|
|
32
|
-
|
33
|
-
<!doctype html>
|
34
|
-
|
35
|
-
<html>
|
36
|
-
|
37
|
-
<head>
|
38
|
-
|
39
|
-
<meta charset="UTF-8">
|
40
|
-
|
41
|
-
<title>parallax demo</title>
|
42
|
-
|
43
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
44
|
-
|
45
|
-
<style>
|
46
|
-
|
47
|
-
|
47
|
+
#slider {
|
48
|
-
|
49
|
-
width: 100
|
48
|
+
width: 100vw;
|
50
|
-
|
51
49
|
height: 100%;
|
52
|
-
|
50
|
+
background-image: url(../images/mainvisual-01.jpg);
|
51
|
+
background-position: top center;
|
52
|
+
background-repeat: no-repeat;
|
53
|
+
background-size: cover;
|
54
|
+
position: fixed;
|
55
|
+
top: 0;
|
56
|
+
z-index: 0;
|
57
|
+
}
|
58
|
+
.content {
|
59
|
+
position: absolute;
|
60
|
+
top: 100%;
|
61
|
+
height: 1000px;
|
62
|
+
background-color: #ccc;
|
53
63
|
}
|
54
64
|
|
55
|
-
body {
|
56
|
-
|
57
|
-
margin: 0;
|
58
|
-
|
59
|
-
padding: 0;
|
60
|
-
|
61
|
-
}
|
62
|
-
|
63
|
-
img {
|
64
|
-
|
65
|
-
width: 100%;
|
66
|
-
|
67
|
-
|
65
|
+
/* ================================================= */
|
68
|
-
|
69
|
-
}
|
70
|
-
|
71
|
-
p {
|
72
|
-
|
73
|
-
margin: 0;
|
74
|
-
|
75
|
-
padding: 0;
|
76
|
-
|
77
|
-
|
66
|
+
/* =================== SP END. ==================== */
|
67
|
+
/* =============================================== */
|
78
68
|
|
79
69
|
}
|
80
70
|
|
81
71
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
72
|
/* ============================================================== */
|
86
|
-
|
87
|
-
/* ======================== 82
|
73
|
+
/* ======================== 825px以上 =========================== */
|
88
|
-
|
89
74
|
/* ============================================================ */
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
@media screen and (max-width:824px) {
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
#slider {
|
98
|
-
|
99
|
-
width: 100vw;
|
100
|
-
|
101
|
-
height: 100%;
|
102
|
-
|
103
|
-
background-image: url(../images/mainvisual-01.jpg);
|
104
|
-
|
105
|
-
background-position: top center;
|
106
|
-
|
107
|
-
background-repeat: no-repeat;
|
108
|
-
|
109
|
-
background-size: cover;
|
110
|
-
|
111
|
-
position: fixed;
|
112
|
-
|
113
|
-
top: 0;
|
114
|
-
|
115
|
-
z-index: 0;
|
116
|
-
|
117
|
-
}
|
118
|
-
|
119
|
-
.content {
|
120
|
-
|
121
|
-
position: absolute;
|
122
|
-
|
123
|
-
top: 100%;
|
124
|
-
|
125
|
-
height: 1000px;
|
126
|
-
|
127
|
-
background-color: #ccc;
|
128
|
-
|
129
|
-
}
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
/* ================================================= */
|
134
|
-
|
135
|
-
/* =================== SP END. ==================== */
|
136
|
-
|
137
|
-
/* =============================================== */
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
}
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
/* ============================================================== */
|
148
|
-
|
149
|
-
/* ======================== 825px以上 =========================== */
|
150
|
-
|
151
|
-
/* ============================================================ */
|
152
|
-
|
153
|
-
|
154
75
|
|
155
76
|
@media screen and (min-width:825px) {
|
156
77
|
|
78
|
+
#slider {
|
79
|
+
width: 100vw;
|
80
|
+
height: 100%;
|
81
|
+
background-image: url(../images/mainvisual-01.jpg);
|
82
|
+
background-position: center;
|
83
|
+
background-repeat: no-repeat;
|
84
|
+
background-size: cover;
|
85
|
+
background-attachment: fixed;
|
86
|
+
}
|
87
|
+
.content {
|
88
|
+
height: 1000px;
|
89
|
+
background-color: #ccc;
|
90
|
+
}
|
157
91
|
|
158
|
-
|
159
|
-
|
92
|
+
/* ================================================= */
|
160
|
-
|
161
|
-
|
93
|
+
/* =================== PC END. ==================== */
|
162
|
-
|
163
|
-
height: 100%;
|
164
|
-
|
165
|
-
|
94
|
+
/* =============================================== */
|
166
|
-
|
167
|
-
background-position: center;
|
168
|
-
|
169
|
-
background-repeat: no-repeat;
|
170
|
-
|
171
|
-
background-size: cover;
|
172
|
-
|
173
|
-
background-attachment: fixed;
|
174
95
|
|
175
96
|
}
|
176
|
-
|
177
|
-
.content {
|
178
|
-
|
179
|
-
height: 1000px;
|
180
|
-
|
181
|
-
background-color: #ccc;
|
182
|
-
|
183
|
-
}
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
/* ================================================= */
|
188
|
-
|
189
|
-
/* =================== PC END. ==================== */
|
190
|
-
|
191
|
-
/* =============================================== */
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
}
|
196
|
-
|
197
97
|
</style>
|
198
|
-
|
199
98
|
</head>
|
200
|
-
|
201
|
-
|
202
99
|
|
203
100
|
<body>
|
204
101
|
|
205
|
-
|
206
|
-
|
207
102
|
<div id="slider">
|
208
|
-
|
209
103
|
</div>
|
210
|
-
|
211
104
|
<!-- /#slider -->
|
212
105
|
|
213
|
-
|
214
|
-
|
215
106
|
<div class="content">
|
216
|
-
|
217
107
|
<p>テキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキストテキスト</p>
|
218
|
-
|
219
108
|
</div>
|
220
|
-
|
221
109
|
<!-- /.content -->
|
222
110
|
|
223
|
-
|
224
|
-
|
225
111
|
</body>
|
226
|
-
|
227
112
|
</html>
|
228
113
|
|
229
|
-
|
230
|
-
|
231
114
|
```
|