質問編集履歴

1

不足点の追加

2020/03/15 16:15

投稿

ringoame49
ringoame49

スコア46

test CHANGED
File without changes
test CHANGED
@@ -22,13 +22,37 @@
22
22
 
23
23
  ```
24
24
 
25
+ <!DOCTYPE html>
26
+
27
+ <html dir="ltr" lang="ja">
28
+
29
+ <head>
30
+
31
+ <meta charset="utf-8">
32
+
33
+ <meta name=”robots” content=”noindex,nofollow“>
34
+
35
+ <meta name="viewport" content="width=750">
36
+
37
+ <link rel="stylesheet" type="text/css" href="teststyle.css">
38
+
39
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
40
+
41
+ <script type="text/javascript" src="testscript.js"></script>
42
+
43
+ <title><?php echo $page_title; ?></title>
44
+
45
+ </head>
46
+
25
47
  <body>
26
48
 
27
49
 
28
50
 
51
+
52
+
29
53
  <div id="naviOpen">
30
54
 
31
- MENU
55
+ MENU
32
56
 
33
57
  </div>
34
58
 
@@ -36,23 +60,25 @@
36
60
 
37
61
  <nav id="headerNavi">
38
62
 
39
- <div id="naviClose">閉じる</div>
63
+ <div id="naviClose">閉じる</div>
40
-
64
+
41
- <ul id="mainMenu">
65
+ <ul id="mainMenu">
66
+
67
+ <li><a href="">AAAAAAA</a></li>
68
+
69
+ <li><a href="">AAAAAAA</a></li>
42
70
 
43
71
  <li><a href="">AAAAAAA</a></li>
44
72
 
45
-             ・
46
-
47
-             ・
48
-
49
-             ・
50
-
51
-             ・
52
-
53
73
  <li><a href="">AAAAAAA</a></li>
54
74
 
75
+ <li><a href="">AAAAAAA</a></li>
76
+
77
+ <li><a href="">AAAAAAA</a></li>
78
+
79
+ <li><a href="">AAAAAAA</a></li>
80
+
55
- </ul>
81
+ </ul>
56
82
 
57
83
  </nav>
58
84
 
@@ -60,17 +86,7 @@
60
86
 
61
87
  <div id="mainHeader">
62
88
 
63
-
89
+
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
90
 
75
91
  </div>
76
92
 
@@ -78,14 +94,88 @@
78
94
 
79
95
  <div id="contentsWrapper">
80
96
 
81
- 固定されたヘッダの下全てを囲むブロック
97
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
98
+
99
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
100
+
101
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
102
+
103
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
104
+
105
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
106
+
107
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
108
+
109
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
110
+
111
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
112
+
113
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
114
+
115
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
116
+
117
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
118
+
119
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
120
+
121
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
122
+
123
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
124
+
125
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
126
+
127
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
128
+
129
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
130
+
131
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
132
+
133
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
134
+
135
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
136
+
137
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
138
+
139
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
140
+
141
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
142
+
143
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
144
+
145
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
146
+
147
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
148
+
149
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
150
+
151
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
152
+
153
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
154
+
155
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
156
+
157
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
158
+
159
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
160
+
161
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
162
+
163
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
164
+
165
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
166
+
167
+ <p> 固定されたヘッダの下全てを囲むブロック</p>
82
168
 
83
169
  </div>
84
170
 
85
171
 
86
172
 
173
+
174
+
87
175
  </body>
88
176
 
177
+ </html>
178
+
89
179
  ```
90
180
 
91
181
 
@@ -94,111 +184,173 @@
94
184
 
95
185
  ```
96
186
 
187
+ *{
188
+
189
+ margin :0px;
190
+
191
+ padding: 0px;
192
+
193
+ }
194
+
195
+
196
+
197
+ html,
198
+
199
+ body,
200
+
201
+ p,
202
+
203
+ dl, dt, dd {
204
+
205
+ padding: 0;
206
+
207
+ margin: 0;
208
+
209
+ word-wrap: break-word;
210
+
211
+ }
212
+
97
213
  body {
98
214
 
99
- width: 750px;
215
+ width: 750px;
100
-
216
+
101
- min-width: 750px;
217
+ min-width: 750px;
102
218
 
103
219
  }
104
220
 
105
221
  #contentsWrapper {
106
222
 
107
- margin-top: 150px;
223
+ margin-top: 150px;
108
-
224
+
109
- width: 750px;
225
+ width: 750px;
110
-
226
+
111
- min-width: 750px;
227
+ min-width: 750px;
112
-
228
+
113
- -webkit-overflow-scrolling: touch;
229
+ -webkit-overflow-scrolling: touch;
114
230
 
115
231
  }
116
232
 
117
233
  #mainHeader {
118
234
 
119
- position: fixed;
235
+ position: fixed;
236
+
120
-
237
+ top: 0;
238
+
239
+ left: 0;
240
+
121
- width: 100%;
241
+ width: 100%;
122
-
242
+
123
- min-width: 750px;
243
+ min-width: 750px;
124
-
244
+
125
- height: 150px;
245
+ height: 150px;
246
+
247
+ background: #505050;
126
248
 
127
249
  }
128
250
 
129
251
  #headerNavi {
130
252
 
131
- display: none;
253
+ display: none;
132
-
254
+
133
- position: fixed;
255
+ position: fixed;
134
-
256
+
135
- width: 750px;
257
+ width: 750px;
136
-
258
+
137
- top: 0;
259
+ top: 0;
260
+
138
-
261
+ right: 0;
262
+
139
- overflow-y: scroll;
263
+ overflow-y: scroll;
140
-
264
+
141
- z-index: 2;
265
+ z-index: 2;
266
+
267
+ background: red;
142
268
 
143
269
  }
144
270
 
145
271
  #headerNavi ul {
146
272
 
147
- width: 750px;
273
+ width: 750px;
148
274
 
149
275
  }
150
276
 
151
277
  #naviOpen {
152
278
 
153
- display: block;
279
+ display: block;
154
-
280
+
155
- position: fixed;
281
+ position: fixed;
156
-
282
+
157
- top: 0;
283
+ top: 0;
158
-
284
+
159
- right: 0;
285
+ right: 0;
160
-
286
+
161
- width: 150px;
287
+ width: 150px;
162
-
288
+
163
- height: 150px;
289
+ height: 150px;
164
-
290
+
165
- z-index: 1;
291
+ z-index: 1;
292
+
293
+ background: #cdcdcd;
294
+
295
+
296
+
297
+ }
298
+
299
+ .hide {
300
+
301
+ overflow: hidden;
302
+
303
+ }
304
+
305
+ }
306
+
307
+ ```
308
+
309
+
310
+
311
+ JavaScript
312
+
313
+ ```
314
+
315
+ $(function(){
166
316
 
167
317
 
168
318
 
169
- }
170
-
171
- .hide {
172
-
173
- overflow: hidden;
319
+ windowWidth = window.innerWidth;
174
-
175
- }
320
+
176
-
177
- ```
321
+ contentsWrapper = $('#contentsWrapper');
178
-
179
-
180
-
322
+
323
+
324
+
181
- JavaScript
325
+ var screenHeight = window.innerHeight;
182
-
326
+
183
- ```
327
+ var UnderFixdeHeight = parseInt(screenHeight) - 150;
184
-
328
+
185
- // スマホナビメニュー
329
+ contentsWrapper.css('height', UnderFixdeHeight);
330
+
331
+ $('#headerNavi').css('height', screenHeight);
332
+
333
+
186
334
 
187
335
  $('#naviOpen').on('click', function() {
188
336
 
189
- $(this).next().animate( { width: 'show' }, 500);
337
+ $(this).next().animate( { width: 'show' }, 500);
190
338
 
191
339
  contentsWrapper.addClass('hide');
192
340
 
193
- } );
341
+ } );
194
342
 
195
343
  $('#naviClose') .on('click', function() {
196
344
 
197
- $(this).parent().animate( { width: 'hide' }, 500);
345
+ $(this).parent().animate( { width: 'hide' }, 500);
198
346
 
199
347
  contentsWrapper.removeClass('hide');
200
348
 
201
- } );
349
+ } );
350
+
351
+
352
+
353
+ });
202
354
 
203
355
  ```
204
356