teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

追記依頼が来たので、該当HTMLとCSSを追記

2017/12/17 15:25

投稿

misato_3310
misato_3310

スコア14

title CHANGED
File without changes
body CHANGED
@@ -7,8 +7,357 @@
7
7
 
8
8
  スマートフォン(Android)でchromeをお使いの方は分かるかと思いますが、上のURLなどが記載されているツールバーが下にスクロールした際に表示されなくなります。
9
9
  そのせいで読み込み時のwindowの高さと実際に表示されているwindowの高さにずれが生じ、問題が起こっているのだと思われます。
10
+ ###該当のHTML
11
+ ```ここに言語を入力
12
+ <!DOCTYPE HTML>
10
13
 
14
+ <html>
15
+ <head>
16
+
17
+ <meta charset="UTF-8">
18
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
19
+ <meta name="format-detection" content="telephone=no"/>
20
+ <meta name="description" content="●●,●●">
21
+ <meta name="keywords" content="●●,●●">
22
+
23
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
24
+ <script type="text/javascript" src="js/animation.js"></script>
25
+
26
+ <link rel="stylesheet" type="text/css" href="css/animate.css" />
27
+ <link rel="stylesheet" href="css/style.css" />
28
+
29
+ </head>
30
+
31
+ <body>
32
+ <div id="wrapper">
33
+
34
+ <section id="message" class="animated" data-section-name="message">
35
+ <div class="header">
36
+ <img class="small" src="images/index/main_img.jpg" />
37
+ <h1>
38
+ <img class="head_logo01 animated" src="images/common/logo_mark.png" alt="" />
39
+ <img class="logo03 animated" src="images/common/logo_before.png" alt="" />
40
+ <img class="logo02 animated" src="images/common/logo_white.png" alt="" />
41
+ </h1>
42
+ </div>
43
+
44
+ <div class="content">
45
+
46
+ <div class="block_container clearfix">
47
+ <div class="block">
48
+ <p>ダミーテキスト</p>
49
+ <p>ダミーテキスト</p>
50
+ </div>
51
+ </div>
52
+
53
+ <div class="block_container clearfix">
54
+ <div class="block">
55
+ <p>ダミーテキスト</p>
56
+ <p>ダミーテキスト</p>
57
+ </div>
58
+ </div>
59
+
60
+ <div class="block_container clearfix">
61
+ <div class="block">
62
+ <p>ダミーテキスト</p>
63
+ <p>ダミーテキスト</p>
64
+ </div>
65
+ </div>
66
+
67
+ </div>
68
+ </section> <!-- /#message -->
69
+
70
+ <section id="works" class="animated" data-section-name="works">
71
+ <div class="title">
72
+ <img class="logo01 animated" src="images/common/logo_mark.png" alt="" />
73
+ <img class="logo02 animated" src="images/common/logo_black.png" alt="" />
74
+ <h2>ダミーテキスト</h2>
75
+ </div>
76
+ <div class="content">
77
+ <p>ダミーテキスト</p>
78
+ <p>ダミーテキスト</p>
79
+ </div>
80
+ </section> <!-- /#works -->
81
+
82
+ </div> <!-- /#wrapper -->
83
+
84
+
85
+ <script type="text/javascript" src="js/jquery.scrollify.min.js"></script>
86
+ <script type="text/javascript" src="js/jquery.inview.js"></script>
87
+ <script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
88
+ <script type="text/javascript" src="js/scroll.js"></script>
89
+
90
+ </body>
91
+ </html>
92
+ ```
93
+
94
+ ###該当のCSS
95
+ style.css
96
+ ```ここに言語を入力
97
+ @charset "utf-8";
98
+
99
+ /* -------------------------------
100
+ common
101
+ ------------------------------- */
102
+ body, p {
103
+ margin: 0;
104
+ padding: 0;
105
+ font-weight: normal;
106
+ }
107
+
108
+ img {
109
+ border:0;
110
+ vertical-align: top;
111
+ }
112
+
113
+ body {
114
+ width: 100%;
115
+ font-size: 0.9rem;
116
+ font-family: "メイリオ",Meiryo,Osaka,"ヒラギノ角ゴ Pro W3","Hiragino Kaku Gothic Pro","MS Pゴシック","MS PGothic",sans-serif;
117
+ color: #333;
118
+ line-height: 1.5;
119
+ -webkit-text-size-adjust: none;
120
+ background-color: #000;
121
+ letter-spacing: 0.3em;
122
+ }
123
+
124
+ a{
125
+ outline: none;
126
+ text-decoration: none;
127
+ }
128
+
129
+ a:hover {
130
+ text-decoration: none;
131
+ }
132
+
133
+ #wrapper {
134
+ overflow: hidden;
135
+ max-width: 1080px;
136
+ margin: 0 auto;
137
+ }
138
+
139
+ h1 {
140
+ margin: 0;
141
+ }
142
+
143
+ h2 {
144
+ font-size: 150%;
145
+ font-weight: normal;
146
+ margin: 0;
147
+ }
148
+
149
+ h3 {
150
+ font-weight: normal;
151
+ margin: 0 0 3%;
152
+ font-size: 100%;
153
+ }
154
+
155
+ h4 {
156
+ font-weight: normal;
157
+ margin: 0;
158
+ font-family: "Times New Roman";
159
+ }
160
+
161
+ /* --------------------------------
162
+ clearfix
163
+ * ----------------------------- */
164
+ .clearfix:after {
165
+ content: "";
166
+ display: block;
167
+ height: 0;
168
+ clear: both;
169
+ }
170
+
171
+ .clearfix{
172
+ display: block;
173
+ *zoom: 1;
174
+ }
175
+
176
+ /* -------------------------------
177
+ section
178
+ ------------------------------- */
179
+ section {
180
+ background-color: #fff;
181
+ animation-duration: .3s;
182
+ -webkit-animation-duration: .3s;
183
+ height: 100%;
184
+ }
185
+
186
+ .content {
187
+ width: 60%;
188
+ margin: 0 auto;
189
+ }
190
+
191
+ @media screen and (max-width: 640px) {
192
+ .content {
193
+ width: 94%;
194
+ padding: 3%;
195
+ }
196
+ }
197
+
198
+
199
+ .title {
200
+ text-align: center;
201
+ padding: 4% 0;
202
+ }
203
+
204
+ .title img.logo01 {
205
+ max-width: 17%;
206
+ width: auto;
207
+ height: auto;
208
+ margin: 0 auto;
209
+ display: block;
210
+ padding-right: 2.3%;
211
+ }
212
+
213
+ .title img.logo02 {
214
+ max-width: 32%;
215
+ width: auto;
216
+ height: auto;
217
+ margin: 0 auto 4%;
218
+ display: block;
219
+ animation-duration: 3s;
220
+ -webkit-animation-duration: 3s;
221
+ animation-delay: .5s;
222
+ -webkit-animation-delay: .5s;
223
+ }
224
+
225
+ @media screen and (min-width: 1000px) {
226
+ .title img.logo01 {
227
+ max-width: 13%;
228
+ }
229
+
230
+ .title img.logo02 {
231
+ max-width: 25%;
232
+ }
233
+ }
234
+
235
+ /* -------------------------------
236
+ message
237
+ -------------------------------- */
238
+ #message {
239
+ background-color: #333;
240
+ font-family: 'Sawarabi Mincho', serif;
241
+ }
242
+
243
+ .header{
244
+ position: relative;
245
+ width: 100%;
246
+ margin-bottom: 4%;
247
+ }
248
+
249
+ .header img {
250
+ width: 100%;
251
+ }
252
+
253
+ .header img.head_logo01 {
254
+ position: absolute;
255
+ max-width: 18%;
256
+ width: auto;
257
+ height: auto;
258
+ left: 46%;
259
+ right: 0;
260
+ top: 25%;
261
+ margin: auto;
262
+ animation-duration: 1.2s;
263
+ -webkit-animation-duration: 1.2s;
264
+ animation-delay: 1.5s;
265
+ -webkit-animation-delay: 1.5s;
266
+ }
267
+
268
+ .header img.logo02 {
269
+ position: absolute;
270
+ max-width: 35%;
271
+ width: auto;
272
+ height: auto;
273
+ left: 49%;
274
+ right: 0;
275
+ top: 40.85%;
276
+ margin: auto;
277
+ animation-duration: 3s;
278
+ -webkit-animation-duration: 3s;
279
+ animation-delay: 2.7s;
280
+ -webkit-animation-delay: 2.7s;
281
+ }
282
+
283
+ .header img.logo03 {
284
+ position: absolute;
285
+ max-width: 68%;
286
+ width: auto;
287
+ height: auto;
288
+ left: 0;
289
+ right: 18.15%;
290
+ top: 42.1%;
291
+ margin: auto;
292
+ animation-duration: 2s;
293
+ -webkit-animation-duration: 2s;
294
+ }
295
+
296
+
297
+ @media screen and (min-width: 1000px) {
298
+ .header {
299
+ height: 600px;
300
+ width: 100%;
301
+ overflow: hidden;
302
+ position: relative;
303
+ }
304
+
305
+ .header img.small {
306
+ position: absolute;
307
+ left: 0;
308
+ bottom: -15%;
309
+ right: 0;
310
+ width: 100%;
311
+ height: auto;
312
+ }
313
+
314
+ .header img.head_logo01 {
315
+ top: 6%;
316
+ right: 14%;
317
+ max-width: 13%;
318
+ }
319
+
320
+ .header img.logo02 {
321
+ top: 28%;
322
+ left: 35%;
323
+ max-width: 25%;
324
+ }
325
+
326
+ .header img.logo03 {
327
+ max-width: 48%;
328
+ right: 12.5%;
329
+ top: 29.5%;
330
+ }
331
+ }
332
+
333
+ #message .block {
334
+ padding: 4%;
335
+ margin-bottom: 4%;
336
+ text-align: center;
337
+ }
338
+
339
+ #message .block p {
340
+ padding: 1%;
341
+ color: #fff;
342
+ }
343
+
344
+ /* -------------------------------
345
+ works
346
+ -------------------------------- */
347
+ #works .content p {
348
+ text-align: center;
349
+ padding: 1.5% 0;
350
+ }
351
+
352
+ #works .content p:first-of-type {
353
+ padding: 0 0 3%;
354
+ }
355
+
356
+ ```
357
+
358
+
11
359
  ###該当のjs
360
+ scroll.js
12
361
  ```ここに言語を入力
13
362
  var option = {
14
363
  section : "section", // 対象を指定