PHP & JavaScript Room :: 設置サンプル

実行結果

CrossSlide | 設置サンプル

Slide + cross-fade

画像ごとに上下どちらにクロスフェードするか指定可能です。

Loading…

Static cross-fade

通常のクロスフェード。画像にリンクを指定可能です。

Loading…

Ken Burns effect

画像のどのいちからどの位置までクロスフェードするか指定可能です。

Loading…

設置サンプルのソース

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <meta http-equiv="Content-Language" content="ja" />
      <meta http-equiv="Content-Script-Type" content="text/javascript" />
      <meta http-equiv="Content-Style-Type" content="text/css" />
      <meta http-equiv="imagetoolbar" content="no" />
      <title>CrossSlide | 設置サンプル</title>
      <link rel="stylesheet" type="text/css" href="/content/lib/global.css" media="all" />
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
      <script type="text/javascript" src="/content/lib/jquery/jquery.cross-slide.js"></script>
       <script type="text/javascript">
      $(function() {
         $('#gallery1').crossSlide(
            {
               speed: 45, //in px/sec
               fade: 1    //in sec
            },
            [
              { src: '/content/lib/galleryimages/christmas-party-1.jpg', dir: 'up'   },
              { src: '/content/lib/galleryimages/christmas-party-2.jpg', dir: 'down' },
              { src: '/content/lib/galleryimages/christmas-party-4.jpg', dir: 'up'   },
              { src: '/content/lib/galleryimages/christmas-party-5.jpg', dir: 'down' }
            ]
         );
      });
      $(function() {
         $('#gallery2').crossSlide({
            sleep: 2, //in sec
            fade: 1   //in sec
         },
         [
            { src: '/content/lib/galleryimages/flickr/cake1.jpg', href: 'http://www.flickr.com/photos/22559849@N06/2314028177/' },
            { src: '/content/lib/galleryimages/flickr/cake2.jpg', href: 'http://www.flickr.com/photos/22559849@N06/2314027955/' },
            { src: '/content/lib/galleryimages/flickr/gyubei.jpg', href: 'http://www.flickr.com/photos/22559849@N06/2232217285/' },
            { src: '/content/lib/galleryimages/flickr/hiraku1.jpg', href: 'http://www.flickr.com/photos/22559849@N06/2852943318/' },
            { src: '/content/lib/galleryimages/flickr/hiraku2.jpg', href: 'http://www.flickr.com/photos/22559849@N06/2852109217/' },
            { src: '/content/lib/galleryimages/flickr/krispykremedoughnuts.jpg', href: 'http://www.flickr.com/photos/22559849@N06/2170286465/' },
            { src: '/content/lib/galleryimages/flickr/magicspice.jpg', href: 'http://www.flickr.com/photos/22559849@N06/2232217029/' },
            { src: '/content/lib/galleryimages/flickr/silverg.jpg', href: 'http://www.flickr.com/photos/22559849@N06/2232234261/' }
         ]);
      });
      $(function() {
         $('#gallery3').crossSlide({
               fade: 1
            },
            [
               {
                  src:  '/content/lib/galleryimages/christmas-party-1.jpg',
                  from: '100% 80% 1x',
                  to:   '100% 0% 1.7x',
                  time: 3
               },
               {
                  src:  '/content/lib/galleryimages/christmas-party-2.jpg',
                  from: 'top left',
                  to:   'bottom right 1.5x',
                  time: 2
               },
               {
                  src:  '/content/lib/galleryimages/christmas-party-4.jpg',
                  from: '100% 80% 1.5x',
                  to:   '80% 0% 1.1x',
                  time: 2
               },
               {
                  src:  '/content/lib/galleryimages/christmas-party-5.jpg',
                  from: '100% 50%',
                  to:   '30% 50% 1.5x',
                  time: 2
               }
            ]
         );
      });
      </script>
      <style type="text/css">
      #gallery1 { margin:1em auto; border:2px solid #555; width:450px; height:180px; }
      #gallery2 { margin:1em auto; border:2px solid #555; width:240px; height:180px; }
      #gallery3 { margin:1em auto; border:2px solid #555; width:450px; height:180px; }
      </style>
   <link rel="stylesheet" type="text/css" href="/common/css/example.css"></head>
   <body id='example3' class='example'><div class="ads" style="margin:32px auto;text-align:center;"></div><h1 class='h'><a href='/'>PHP &amp; JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
      <h1><a href='http://www.gruppo4.com/~tobia/cross-slide.shtml'>CrossSlide</a> | 設置サンプル</h1>
      <h2>Slide + cross-fade</h2>
      <p>画像ごとに上下どちらにクロスフェードするか指定可能です。</p>
      <div id='gallery1'>Loading…</div>

         <h2>Static cross-fade</h2>
         <p>通常のクロスフェード。画像にリンクを指定可能です。</p>
      <div id='gallery2'>Loading…</div>

      <h3>Ken Burns effect</h2>
      <p>画像のどのいちからどの位置までクロスフェードするか指定可能です。</p>
      <div id='gallery3'>Loading…</div>

      </body>
</html>