質問編集履歴

1

補足説明

2019/10/19 16:58

投稿

isseitakeda
isseitakeda

スコア8

test CHANGED
@@ -1 +1 @@
1
- [jQuery]特定の位置にスクロールが来たら、インベントを発生させたいです。
1
+ [jQuery]特定の位置にスクロール(横スクロール)したら、インベントを発生させたいです。
test CHANGED
@@ -2,9 +2,17 @@
2
2
 
3
3
  横スクロールができるjQuery Mousewheelを使っています。
4
4
 
5
-
5
+ 横スクロールすると、見出しが発生するよにしたいです。
6
+
7
+
8
+
6
-
9
+ 現状は更新と同時に見出しのインベントが発生しています。
10
+
11
+
12
+
7
- 見出しにanimate.cssのjq
13
+ 見出しにanimate.cssのjQueryを使っています。
14
+
15
+ どうぞよろしくおねがします。
8
16
 
9
17
 
10
18
 
@@ -164,6 +172,206 @@
164
172
 
165
173
  ```
166
174
 
175
+ ```css
176
+
177
+ @charset "UTF-8";
178
+
179
+
180
+
181
+ body {
182
+
183
+ overflow: hidden;
184
+
185
+ }
186
+
187
+
188
+
189
+ .first-view {
190
+
191
+ width: 100vw;
192
+
193
+ height: 100vh;
194
+
195
+ background: url(/demo/.assets/history-scroll01.jpg) no-repeat bottom center;
196
+
197
+ background-size: cover;
198
+
199
+ overflow: hidden;
200
+
201
+ position: fixed;
202
+
203
+ }
204
+
205
+
206
+
207
+ .first-view h1 {
208
+
209
+ position: absolute;
210
+
211
+ top: 50%;
212
+
213
+ left: 50%;
214
+
215
+ transform: translateY(-50%) translateX(-50%);
216
+
217
+ text-align: center;
218
+
219
+ font-size: 30px;
220
+
221
+ letter-spacing: .2rem;
222
+
223
+ margin: -6% auto 0;
224
+
225
+ }
226
+
227
+
228
+
229
+ .first-view h1 img {
230
+
231
+ width: 180px;
232
+
233
+ display: block;
234
+
235
+ margin: 0 auto 30px;
236
+
237
+ }
238
+
239
+
240
+
241
+ #main-wrapper{
242
+
243
+ margin: 0 auto 0 100vw;
244
+
245
+ height: 100vh;
246
+
247
+ padding: 0;
248
+
249
+ z-index: 10;
250
+
251
+ overflow: hidden;
252
+
253
+ position: relative;
254
+
255
+ background: rgba(255,255,255,.8);
256
+
257
+ }
258
+
259
+ #main-wrapper:after {
260
+
261
+ content: "";
262
+
263
+ position: absolute;
264
+
265
+ bottom: 40px;
266
+
267
+ left: 0;
268
+
269
+ background: rgba(185, 7, 23, 1);
270
+
271
+ width: 100%;
272
+
273
+ height: 2px;
274
+
275
+ }
276
+
277
+ .item-box {
278
+
279
+ float: left;
280
+
281
+ margin: 0 auto;
282
+
283
+ height: 100vh;
284
+
285
+ padding: 0;
286
+
287
+ z-index: 10;
288
+
289
+ overflow: hidden;
290
+
291
+ width: 2000px;
292
+
293
+ border-left: 1px dotted #ccc;
294
+
295
+ position: relative;
296
+
297
+ }
298
+
299
+ .item-box:after {
300
+
301
+ content: "";
302
+
303
+ position: absolute;
304
+
305
+ left: 50%;
306
+
307
+ margin-left: -5px;
308
+
309
+ bottom: 36px;
310
+
311
+ background: rgba(185, 7, 23, 1);
312
+
313
+ width: 10px;
314
+
315
+ height: 10px;
316
+
317
+ border-radius: 5px;
318
+
319
+ }
320
+
321
+ .item-detail {
322
+
323
+ position: absolute;
324
+
325
+ top: 30%;
326
+
327
+ left: 50%;
328
+
329
+ transform: translateY(-50%) translateX(-50%);
330
+
331
+ width: 80%;
332
+
333
+ }
334
+
335
+ .item-detail h2, .item-detail p {
336
+
337
+ letter-spacing: 0.1em;
338
+
339
+ text-align: justify;
340
+
341
+ line-height: 1.4;
342
+
343
+ margin-bottom: 15px;
344
+
345
+ }
346
+
347
+ .item-detail h2 {
348
+
349
+ margin-top:0;
350
+
351
+ margin-bottom:15px;
352
+
353
+ text-align: center;
354
+
355
+ font-size: 2.5em;
356
+
357
+ }
358
+
359
+ .item-detail img {
360
+
361
+ display: block;
362
+
363
+ margin: 0 auto 10px;
364
+
365
+ width: 160px;
366
+
367
+ }
368
+
369
+
370
+
371
+
372
+
373
+ ```
374
+
167
375
 
168
376
 
169
377
  ```js
@@ -217,3 +425,9 @@
217
425
  });
218
426
 
219
427
  ```
428
+
429
+
430
+
431
+ 参考サイトです
432
+
433
+ [リンク内容](https://www.sidethree.co.jp/blog/memo/201904-1.html)