超酷堆叠相片转瀑布流网格布局动画效果设计

网格布局 瀑布流 2016-02-18

控件介绍
这是一款效果超酷堆叠相片转瀑布流网格布局动画效果设计。该效果的灵感来源于takeit网站,它上面的一组堆叠相片在点击按钮或向下滚动鼠标时,会动画转换为网格瀑布流布局。
浏览器兼容

支持IE10+

演示下载 5338
使用方法

该效果中的元素动画使用dynamic.js来制作,而瀑布流布局则使用flexbox来制作。

使用方法

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
<div class="view">
  <header class="header">
    <!-- some links -->
  </header>
 
  <section class="page page--mover">
    <div class="la-square-loader"><div></div></div>
  </section>
 
  <div class="title-wrap">
    <h1 class="title title--main">OH<em>!</em>SNAP</h1>
    <p class="title title--sub">Smart Auto-Filtering for your shots.</p>
  </div>
 
  <section class="page page--static">
 
    <div class="page__title">
      <h2 class="page__title-main">......</h2>
      <p class="page__title-sub">......</p>
    </div>
 
    <ul class="grid">
      <li class="grid__item">
        <a class="grid__link" href="#">
          <img class="grid__img" src="img/photos/1.jpg" alt="Some image" />
          <h3 class="grid__item-title">Natural saturation effects</h3>
        </a>
      </li>
      <li class="grid__item"><!-- ... --></li>
      <li class="grid__item"><!-- ... --></li>
      <li class="grid__item"><!-- ... --></li>
      <!-- ... -->
    </ul>
 
    <button class="button button--load" aria-label="Load more images">
      <svg class="polaroid" width="100%" height="100%" viewBox="0 0 220 243" preserveAspectRatio="xMidYMid meet">
        <rect class="polaroid__base" x="0" y="0" width="220" height="243" rx="5"></rect>
        <rect class="polaroid__inner" x="16" y="20" width="189" height="149"></rect>
        <g class="polaroid__loader">
          <circle cx="61.5" cy="94.5" r="17.5"></circle>
          <circle cx="110.5" cy="94.5" r="17.5"></circle>
          <circle cx="159.5" cy="94.5" r="17.5"></circle>
        </g>
      </svg>
      <span class="button__text">Load more</span>
    </button>
 
  </section>
 
  <div class="device">
    <div class="device__screen"></div>
  </div>
 
  <button id="showgrid" class="button button--view" aria-label="Show me more">
    <svg width="100%" height="100%" viewBox="0 0 310 177" preserveAspectRatio="xMidYMid meet">
      <path fill="#FFFFFF" d="M159.875,174.481L306.945,27.41c2.93-2.929,2.93-7.678,0-10.606L292.803,2.661c-1.406-1.407-3.314-2.197-5.303-2.197c-1.989,0-3.896,0.79-5.303,2.197L154.572,130.287L26.946,2.661c-1.406-1.407-3.314-2.197-5.303-2.197c-1.989,0-3.897,0.79-5.303,2.197L2.197,16.804C0.733,18.269,0,20.188,0,22.107s0.732,3.839,2.197,5.303l147.071,147.071C152.197,177.411,156.945,177.411,159.875,174.481L159.875,174.481z" />
    </svg>
  </button>
</div><!-- /view -->              

下面是该堆叠相片转瀑布流网格布局动画效果的一些截图效果:

原文地址:Polaroid Stack to Grid Intro Animation

本文转载请注明出处:http://www.zhuiye.com/detail_1288.html