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

実行結果

Blending images | 設置サンプル

▼画像が溶け合うように切り替わる画像スライドショー。

クロスフェード

クロスフェード(キャプション付き)

イルミネーション@サザンテラス イルミネーション@サザンテラス Starbucks Coffee 新宿サザンテラス店 クリスピー・クリーム・ドーナツ 新宿サザンテラス店

設置サンプルのソース

<!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>Blending images | 設置サンプル</title>
      <link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
      <!-- JS -->
      <script type="text/javascript" src="/content/lib/blendimages.js"></script>
      <script type="text/javascript">
         function init(){
            blendImages('sample1', 180, 240);
            blendImages('sample2', 240, 180, 'caption');
         }
         window.onload=init;
      </script>
      <style type="text/css">
         /* クロスフェード */
         .blend img {
            opacity: 0;
            -moz-opacity: 0;
            -khtml-opacity:0;
            filter: alpha(opacity=0);
         }
         #sample1 {
            width:180px; height:240px;
         }
         .sample {
            position:relative;
            width:240px; height:180px;
         }
         #sample2 {
            width:240px; height:180px;
            overflow:hidden;
            position:absolute;
            top:0px; left:0px;
         }
         #caption {
            position:absolute;
            color:#fff;
            font-size:12px;
            font-style:italic;
            width:220px;
            top:6px; left:8px;
            z-index:200;
         }
      </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>
      <div id="wrap">
         <h1><a href='http://brainerror.net/scripts/javascript/blendtrans/demo.html'>Blending images</a> | 設置サンプル</h1>
         <p>▼画像が溶け合うように切り替わる画像スライドショー。</p>
<!-- CODE -->
         <h2>クロスフェード</h2>
         <div class="blend" id="sample1">
            <img src="http://farm4.static.flickr.com/3294/3142386083_582b0f39ba_m.jpg" alt="">
            <img src="http://farm4.static.flickr.com/3130/3142386079_f2335019bd_m.jpg" alt="">
         </div>

         <h2>クロスフェード(キャプション付き)</h2>
         <div class="sample">
             <div class="blend" id="sample2">
                 <img src="http://farm4.static.flickr.com/3214/3142429603_3b4ddd96a9_m.jpg" alt="イルミネーション@サザンテラス" />
                 <img src="http://farm4.static.flickr.com/3089/3143248598_018daa38eb_m.jpg" alt="イルミネーション@サザンテラス" />
                 <img src="http://farm4.static.flickr.com/3244/3142386073_87c62671a5_m.jpg" alt="Starbucks Coffee 新宿サザンテラス店" />
                 <img src="http://farm4.static.flickr.com/3113/3142386067_fc176636eb_m.jpg" alt="クリスピー・クリーム・ドーナツ 新宿サザンテラス店" />
             </div>
             <div id="caption"></div>
         </div>
<!-- / CODE -->
      </div>
   </body>
</html>