炫酷css3图片滑动切换效果

当前位置:主页 > CSS3库 > CSS3动画 > 炫酷css3图片滑动切换效果
炫酷css3图片滑动切换效果
分享:

    插件介绍

    这是一款纯css3制作的炫酷图片滑动切换效果。该图片滑动切换效果通过导航按钮来切换图片,图片切换时就像图片被切为几片,然后每一块切片或从左到右或从上到下滑动显示出来。

    浏览器兼容性

    浏览器兼容性
    时间:11-03
    阅读:

简要教程

这个炫酷图片滑动切换效果是用纯css3制作而成。插件中精美的插画来自于花瓣

HTML

html结构分为三个部分:第一,单选按钮和label;第二,用来放置图片切片的容器div,为它定义class为cr-bgimg;第三,还有一个divcr-titles用来放置图片的标题。

<section class="cr-container">      
  <!-- radio buttons and labels -->
  <input id="select-img-1" name="radio-set-1" type="radio" class="cr-selector-img-1" checked/>
  <label for="select-img-1" class="cr-label-img-1">1</label>

  <input id="select-img-2" name="radio-set-1" type="radio" class="cr-selector-img-2" />
  <label for="select-img-2" class="cr-label-img-2">2</label>

  <input id="select-img-3" name="radio-set-1" type="radio" class="cr-selector-img-3" />
  <label for="select-img-3" class="cr-label-img-3">3</label>

  <input id="select-img-4" name="radio-set-1" type="radio" class="cr-selector-img-4" />
  <label for="select-img-4" class="cr-label-img-4">4</label>

  <div class="clr"></div> 

  <!-- panels -->
  <div class="cr-bgimg">
    <div>
      <span>Slice 1 - Image 1</span>
      ...
    </div>
    <div>
      <span>Slice 2 - Image 1</span>
      ...
    </div>
    <div>
      <span>Slice 3 - Image 1</span>
      ...
    </div>
    <div>
      <span>Slice 4 - Image 1</span>
      ...
    </div>
  </div>

  <!-- titles -->
  <div class="cr-titles">
    <h3>
      <span>Serendipity</span>
      <span>What you've been dreaming of</span>
    </h3>
    <h3>
      <span>Adventure</span>
      <span>Where the fun begins</span>
    </h3>
    <h3>
      <span>Nature</span>
      <span>Unforgettable eperiences</span>
    </h3>
    <h3>
      <span>Serenity</span>
      <span>When silence touches nature</span>
    </h3>
  </div>
</section>
              

更详细的教程请参看《