jquery带旋转背景特效的页面布局

jquery带旋转背景特效的页面布局

这是一款带旋转背景特效的两栏页面布局。该页面布局将页面按颜色分为左右两栏,中间配上轮播图片。当点击前后导航按钮的时候,页面以颜色为视觉感进行旋转,同时切换轮播图,效果非常炫酷。

使用方法
在页面中引入以下文件。

1
2
3
4
5
<link rel="stylesheet" type="text/css" href="assets/css/demo.css" />
<script src="js/jquery.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/2.0.2/TweenMax.min.js"></script>
<script src="https://unpkg.com/imagesloaded@4.1.4/imagesloaded.pkgd.min.js"></script>
<script src="assets/js/demo.js"></script>

HTML结构
基本的HTML结构如下。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<div class="loader">
  <div class="lds-ripple">
    <div></div>
    <div></div>
  </div>
</div>
<header>
  <div class="header-inner">
    <div class="logo">
      <a href="#"><span>microsite</span></a>
    </div>
    <div class="header-headline">
      <div class="slides-navigation">
        <ul>
            <li><a class="main-nav__link is-active" href="#slide-01" data-id="0"><span>Never</span></a></li>
            <li><a class="main-nav__link" href="#slide-02" data-id="1"><span>stop</span></a></li>
            <li><a class="main-nav__link" href="#slide-03" data-id="2"><span>dreaming</span></a></li>
        </ul>
      </div>
    </div>
  </div>
</header>
<section class="coidea-slider">
  <div class="slides-background"></div>
  <div class="slides-container">
    <div class="slides-iphone">
      <div class="iphone"></div>
      <div class="image" style="background-image: url(assets/img/img-1.jpeg);"></div>
      <div class="image-blank"></div>
    </div>
    <article id="slide-01" class="slide is-active" data-bcg="assets/img/img-1.jpeg">
      <div class="slide__content slide__content_left">
        <h1 class="slide__title slide__title_left">Be a voice.</h1>
        <p class="slide__subtitle slide__subtitle_left">Never stop dreaming.</p>
      </div>
      <div class="slide__content slide__content_right">
        <h1 class="slide__title slide__title_right">Not an echo.</h1>
        <p class="slide__subtitle slide__subtitle_right">Never stop dreaming.</p>
      </div>
    </article>
    <article id="slide-02" class="slide" data-bcg="assets/img/img-2.jpeg">
      <div class="slide__content slide__content_left">
        <h1 class="slide__title slide__title_left">Collect<br>moments.</h1>
        <p class="slide__subtitle slide__subtitle_left">Never stop dreaming.</p>
      </div>
      <div class="slide__content slide__content_right">
        <h1 class="slide__title slide__title_right">Not<br>things.</h1>
        <p class="slide__subtitle slide__subtitle_right">Never stop dreaming.</p>
      </div>
    </article>
    <article id="slide-03" class="slide" data-bcg="assets/img/img-3.jpeg">
      <div class="slide__content slide__content_left">
        <h1 class="slide__title slide__title_left">Find<br>yourself.</h1>
        <p class="slide__subtitle slide__subtitle_left">Never stop dreaming.</p>
      </div>
      <div class="slide__content slide__content_right">
        <h1 class="slide__title slide__title_right">And<br>be that.</h1>
        <p class="slide__subtitle slide__subtitle_right">Never stop dreaming.</p>
      </div>
    </article>
  </div>
</section>
<div class="image-preloader"><img src="assets/img/img-1.jpeg" alt="coidea - 1"></div>
<div class="image-preloader"><img src="assets/img/img-2.jpeg" alt="coidea - 2"></div>
<div class="image-preloader"><img src="assets/img/img-3.jpeg" alt="coidea - 3"></div>
当前内容只有登录了才能查看,如果您已经注册,请登录
3

发表评论