JSDM

HTML

27
1
<div class="rvk">
2
  <div class="rocks">
3
    <h2>Reykjavik Rocks</h2>
4
    <h1>Your Luxury Agent in Iceland</h1>
5
    <p>We deliver high end, customized luxury. Complete tailored experience for Iceland whether it is rejuvenation and relaxation, a family trip, a romantic break for a couple, an individual only or a party experience – we can cater to your every need.</p>
6
    <button>About us</button><button>Contact us</button>  
7
  </div>
8
  <div class="info">
9
    <i></i>
10
    <div class="about-us">
11
      <p>Reykjavik Rocks is the <strong>complete personalized experience</strong>.</p>
12
      <p>Reykjavik Rocks was founded 2009 by Unnar Helgi Danielsson who has <strong>extensive experience in managing tailored events</strong> in Iceland and London.</p>
13
      <p>We have worked with many groups of people from corporate and educational backgrounds to celebrity and well known public figures.</p>
14
      <p>We also cater for bachelor and bachelorette parties plus weddings, anniversaries, film productions, location and set finding – <strong>any event can be created by Reykjavik Rocks</strong>.</p>
15
      <p>Our concierge phone is also <strong>available 24/7</strong>. Please see the number on the site to call.</p>
16
    </div>
17
    <div class="contact-us">
18
      <p>Our concierge phone is <strong>available 24/7</strong>!</p>
19
      <h3>+354 691 3350</h3>
20
      <p>Please contact us for a <strong>fast response</strong> via email: <a href="mailto:luxury@reykjavik.rocks">luxury@reykjavik.rocks<i></i></a></p>
21
    </div>
22
  </div>
23
  <div class="cover"></div>
24
  <div class="tv">
25
    <div class="screen" id="tv"></div>
26
  </div>
27
</div>
!

CSS

x
 
1
2
  @import url(http://fonts.googleapis.com/css?family=Oswald);
3
  @import url(http://fonts.googleapis.com/css?family=Montserrat:400,700);
4
5
  .font(@family,@size,@line,@spacing) {
6
    font-family: @family, sans-serif;
7
    font-weight: 400;
8
    font-size: @size*1px;
9
    line-height: @size*@line*1px;
10
    letter-spacing: @spacing*1px;
11
  }
12
13
  html {
14
    width: 100%;
15
    height: 100%;
16
17
    body {
18
      width: 100%;
19
      height: 100%;
20
21
      margin: 0;
22
      padding: 0;
23
      overflow: hidden;
24
      
25
      background: #000;
26
      color: #ded4b9;   
27
28
      * {
29
        box-sizing: border-box;
30
      }
31
32
      .disabled {
33
        pointer-events: none;
34
      }
35
    }
36
37
    ::selection {
38
      background: #777;
39
      color: #777;
40
    }
41
  }
42
43
  .rvk {
44
45
    .rocks {
46
      position: absolute;
47
      top: 50%;
48
      left: 0;
49
      transform: translateY(-50%);
50
      -webkit-transform: translateY(-50%);
51
      z-index: 3;
52
53
      max-width: 1440px;
54
      min-width: 789px;
55
56
      margin: 0 auto;
57
      padding: 0 80px;
58
59
      transition: left .75s cubic-bezier(.75,0,.25,1);
60
      -webkit-transition: left .75s cubic-bezier(.75,0,.25,1);
61
62
      &.on {
63
        left: 360px;
64
      }
65
66
      h2 {
67
        width: 235px;
68
        height: 81px;
69
70
        margin: 0 0 12px;
71
        padding: 0;
72
        overflow: hidden;
73
74
        background: url('http://reykjavik.rocks/cnt/reykjavik-rocks.svg');
75
        background-size: cover;
76
        opacity: 0;
77
78
        text-indent: -234%;
79
80
        &.show {
81
          opacity: 1;
82
          transition: opacity 3s 0s;
83
          -webkit-transition: opacity 3s 0s;
84
        }
85
      }
86
87
      h1 {
88
        max-width: 765px;
89
90
        margin: 0 0 24px;
91
        padding: 0;
92
93
        opacity: 0;
94
95
        .font('Oswald',120,1.19,-5);
96
        text-transform: uppercase;
97
        text-align: left;
98
99
        &.show {
100
          opacity: 1;
101
          transition: opacity 3s 0s;
102
          -webkit-transition: opacity 3s 0s;
103
        }
104
      }
105
106
      p {
107
        max-width: 632px;
108
109
        margin: 0 0 48px 9px;
110
111
        .font(Montserrat,16,1.625,0);
112
113
        opacity: 0;
114
115
        &.show {
116
          opacity: 1;
117
          transition: opacity 3s 1.5s;
118
          -webkit-transition: opacity 3s 1.5s;
119
        }
120
      }
121
122
      button {
123
        display: inline-block;
124
125
        position: relative;
126
127
        width: auto;
128
        height: 77px;
129
130
        margin: 0;
131
        padding: 0 39px;
132
        overflow: hidden;
133
134
        .font(Oswald,20,1,0);
135
        text-transform: uppercase;
136
137
        background: none;
138
        color: #ded4b9;
139
        opacity: 0;
140
141
        border: solid 2px #ded4b9;
142
        outline: none;
143
144
        cursor: pointer;
145
146
        &.show {
147
          opacity: 1;
148
          transition: opacity 2s 2.5s, color .5s cubic-bezier(.75,0,.25,1);
149
          -webkit-transition: opacity 2s 2.5s, color .5s cubic-bezier(.75,0,.25,1);
150
        }
151
152
        &:before {
153
          content: '';
154
155
          position: absolute;
156
          top: 0;
157
          left: 0;
158
          z-index: -1;
159
160
          width: .01%;
161
          height: 100%;
162
163
          background: #ded4b9;
164
165
          transition: width .5s cubic-bezier(.75,0,.25,1);
166
          -webkit-transition: width .5s cubic-bezier(.75,0,.25,1);
167
        }
168
169
        &:hover, &.on {
170
          color: #000;
171
172
          &:before {
173
            width: 100%;
174
          }
175
        }
176
177
        &.on {
178
          pointer-events: none;
179
        }
180
181
        &:first-of-type {
182
          margin-left: 9px;         
183
        }
184
185
        &:last-of-type {
186
          border-left: none;
187
        }
188
      }
189
    }
190
191
    .info {
192
      position: absolute;
193
      top: 0;
194
      left: -360px;
195
      z-index: 3;
196
197
      width: 360px;
198
      height: 100%;
199
200
      background: #f7f3e8;
201
      color: #111;
202
203
      transition: left .75s cubic-bezier(.6,0,.25,1);
204
      -webkit-transition: left .75s cubic-bezier(.6,0,.25,1);
205
206
      > i {
207
        position: absolute;
208
        top: 15px;
209
        left: 15px;
210
211
        width: 18px;
212
        height: 18px;
213
214
        opacity: 0;
215
216
        cursor: pointer;
217
218
        transition: opacity .5s 1.2s;
219
        -webkit-transition: opacity .5s 1.2s;
220
221
        &:before, &:after {
222
          content: '';
223
224
          position: absolute;
225
          top: 50%;
226
          left: 50%;
227
228
          width: 100%;
229
          height: 1px;
230
231
          background: #111;
232
        }
233
234
        &:before {
235
          transform: translate(-50%,-50%) rotate(45deg);
236
          -webkit-transform: translate(-50%,-50%) rotate(45deg);
237
        }
238
239
        &:after {
240
          transform: translate(-50%,-50%) rotate(-45deg);
241
          -webkit-transform: translate(-50%,-50%) rotate(-45deg);
242
        }
243
      }
244
245
      > div {
246
        position: absolute;
247
        top: 150%;
248
        left: 0;
249
        transform: translateY(-50%);
250
        -webkit-transform: translateY(-50%);
251
252
        padding: 40px;
253
254
        transition: top .75s cubic-bezier(.75,0,.25,1);
255
        -webkit-transition: top .75s cubic-bezier(.75,0,.25,1);
256
257
        p {
258
          .font(Montserrat,14,1.625,0);
259
          margin: 0 0 16px;
260
261
          strong {
262
            font-weight: 700;
263
          }
264
        }
265
266
        h3 {
267
          .font(Montserrat,24,1,0);
268
        }
269
270
        a {
271
          position: relative;
272
          color: #000;
273
          text-decoration: none;
274
275
          i {
276
            position: absolute;
277
            bottom: -1px;
278
            left: 0;
279
280
            width: 100%;
281
            height: 1px;
282
283
            &:before {
284
              content: '';
285
              display: block;
286
287
              position: absolute;
288
              bottom: 0;
289
              left: 0;
290
291
              width: 0.001%;
292
              height: 100%;
293
294
              transition: width 0s, background .5s;
295
              -webkit-transition: width 0s, background .5s;
296
            }
297
298
            &:after {
299
              content: '';
300
              display: block;
301
302
              position: absolute;
303
              right: 0;
304
              bottom: 0;
305
306
              width: 0.001%;
307
              height: 100%;
308
309
              background: #000;
310
311
              transition: width .5s;
312
              -webkit-transition: width .5s;
313
            }
314
          }
315
316
          &:hover {
317
318
            i {
319
              &:before {
320
                width: 100%;
321
322
                background: #000;
323
324
                transition: width .5s;
325
                -webkit-transition: width .5s;
326
              }
327
328
              &:after {
329
                width: 100%;
330
331
                background: transparent;
332
333
                transition: background 0s;
334
                -webkit-transition: background 0s;
335
              }
336
            }
337
          }
338
        }
339
340
        &.on {
341
          top: 50%;
342
          transition: top 1.25s cubic-bezier(.75,0,.25,1);
343
          -webkit-transition: top 1.25s cubic-bezier(.75,0,.25,1);
344
        }
345
      }
346
347
      &.on {
348
        left: 0;
349
350
        > i {
351
          opacity: 1;
352
        }
353
      }
354
    }
355
356
    .cover {
357
      position: absolute;
358
      top: 0;
359
      left: 0;
360
      z-index: 2;
361
    
362
      width: 100%;
363
      height: 100%;
364
365
      background: #000;
366
      opacity: 0;
367
368
      transition: opacity 4s;
369
      -webkit-transition: opacity 4s;
370
371
      &.on {
372
        opacity: .6;
373
      }
374
    }
375
376
    .tv {
377
      position: absolute;
378
      top: 0;
379
      left: 0;
380
      z-index: 1;
381
382
      width: 100%;
383
      height: 100%;
384
385
      overflow: hidden;
386
387
      background-image: url('http://reykjavik.rocks/cnt/iceland.jpg');
388
      background-size: cover;
389
      background-position: center;
390
391
      transition: left .75s cubic-bezier(.6,0,.25,1);
392
      -webkit-transition: left .75s cubic-bezier(.6,0,.25,1);
393
394
      &.on {
395
        left: 360px;
396
        transition: left 2s;
397
        -webkit-transition: left 2s;
398
      }
399
400
      .screen {
401
        position: absolute;
402
        top: 0;
403
        left: 0;
404
        z-index: 1;
405
406
        margin: auto;
407
408
        opacity: 0;
409
        transition: opacity 4s;
410
        -webkit-transition: opacity 4s;
411
412
        &.on {
413
          opacity: 1;
414
        }
415
      }
416
    }
417
  }
418
419
  @media (max-width: 920px) {
420
421
    .rvk {
422
423
      .rocks {
424
        padding: 0 40px;
425
426
        &.on {
427
          left: 288px;
428
        }
429
430
        h2 {
431
          width: 188px;
432
          height: 64px;
433
        }
434
435
        h1 {
436
          max-width: 620px;
437
          .font('Oswald',96,1.19,-4);
438
        }
439
440
        p {
441
          max-width: 490px;
442
          margin: 0 0 38px 7px;
443
          .font(Montserrat,14,1.625,0);
444
        }
445
446
        button {
447
          height: 62px;
448
          padding: 0 32px;
449
          font-size: 16px;
450
451
          &:first-child {
452
            margin-left: 7px;
453
          }
454
        }
455
      }
456
457
      .info {
458
        left: -288px;
459
        width: 288px;
460
461
        > div {
462
463
          p {
464
            .font(Montserrat,12,1.625,0);
465
            margin: 0 0 12px;
466
          }
467
468
          h3 {
469
            font-size: 19px;
470
          }
471
        }
472
      }
473
474
      .tv.on {
475
        left: 288px;
476
      }
477
    }
478
  }
479
480
  @media (max-width: 680px) {
481
482
    .rvk {
483
484
      .rocks {
485
        max-width: inherit;
486
        min-width: inherit;
487
488
        h2 {
489
          width: 141px;
490
          height: 48px;
491
        }
492
493
        h1 {
494
          max-width: inherit;
495
          .font('Oswald',48,1.19,-2);
496
        }
497
498
        p {
499
          max-width: 75%;
500
          margin-bottom: 32px;
501
          .font(Montserrat,13,1.625,0);
502
        }
503
504
        button {
505
          height: 49px;
506
          padding: 0 25px;
507
          font-size: 13px;
508
        }
509
      }
510
    }
511
  }
512
513
  @media (max-width: 380px) {
514
515
    .rvk {
516
517
      .rocks {
518
        min-width: 320px;
519
520
        p {
521
          max-width: inherit;
522
        }
523
      }
524
    }
525
  }
526
527
  @media (max-width: 340px) {
528
529
    .rvk {
530
531
      .rocks {
532
        padding: 0 20px;
533
      }
534
    }
535
  }
!
? ?
? ?
必须是有效的URL
+ 添加另一个资源

JS

81
 
1
  var tag = document.createElement('script');
2
    tag.src = 'https://www.youtube.com/player_api';
3
  var firstScriptTag = document.getElementsByTagName('script')[0];
4
    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
5
  var tv,
6
    playerDefaults = {autoplay: 0, autohide: 1, modestbranding: 0, rel: 0, showinfo: 0, controls: 0, disablekb: 1, enablejsapi: 0, iv_load_policy: 3};
7
  var vid = {'videoId': 'E4tRyYxrU5w', 'suggestedQuality': 'hd1080', 'startSeconds': 1, 'endSeconds': 196};
8
9
  function onYouTubePlayerAPIReady(){
10
    tv = new YT.Player('tv', {events: {'onReady': onPlayerReady, 'onStateChange': onPlayerStateChange}, playerVars: playerDefaults});
11
  }
12
13
  function onPlayerReady(){
14
    tv
15
      .loadVideoById(vid)
16
      .seekTo(Math.floor(Math.random() * (180 - 1 + 1)))
17
      .mute();
18
  }
19
20
  function onPlayerStateChange(e){
21
    if (e.data === 1){
22
      $('#tv, .cover').addClass('on');
23
    } else if (e.data === 0){
24
      tv.seekTo(vid.startSeconds);
25
    }
26
  }
27
28
  function vidRescale(){
29
30
    var w = $(window).width() + 200,
31
      h = $(window).height() + 200;
32
33
    if (w/h > 16/9){
34
      tv.setSize(w, w/16*9);
35
      $('.tv .screen').css({'left': '0px'});
36
    } else {
37
      tv.setSize(h/9*16, h);
38
      $('.tv .screen').css({'left': -($('.tv .screen').outerWidth()-w)/2});
39
    }
40
  }
41
42
  $(document).on('ready', function(){
43
44
    $('button').on('click', function(e){
45
      e.stopPropagation();
46
      $('button').removeClass('on');
47
      $(this).toggleClass('on');
48
      $('.rocks, .info, .tv').addClass('on');
49
    });
50
51
    $('button:first-of-type').on('click', function(){
52
      $('.info > div').removeClass('on');
53
      $('.about-us').addClass('on');
54
    });
55
56
    $('button:last-of-type').on('click', function(){
57
      $('.info > div').removeClass('on');
58
      $('.contact-us').addClass('on');
59
    });
60
61
    $('.info').on('click', function(e){
62
      e.stopPropagation();
63
    });
64
65
    $('html, .info > i').on('click', function(){
66
      $('button, .rocks, .info, .tv, .about-us, .contact-us').removeClass('on');
67
    });
68
  });
69
70
  $(window)
71
    .on('load', function(){
72
      vidRescale();
73
      $('.rocks').children().addClass('show');
74
    })
75
    .on('resize', function(){
76
      vidRescale();
77
    });
78
79
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
80
  ga('create', 'UA-59016839-1', 'auto');
81
  ga('send', 'pageview');
!
必须是有效的URL
+ 添加另一个资源
Close

文件管理 点击文件查看URL

图片

  1. 暂无文件

CSS

  1. 暂无文件

JavaScript

  1. 暂无文件

其他

  1. 暂无文件
拖动文件到上面的区域或者:
加载中 ..................