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

実行結果

設置サンプル

参照:AnythingZoomer

テキスト

テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。
テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。
テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。
テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。
テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。

テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。
テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。
テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。
テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。
テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。

画像

small rushmore
big rushmore

設置サンプルのソース

<!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>設置サンプル</title>
      <link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script>
      <script type="text/javascript" src="/content/lib/jquery/zoomer.jquery.js" ></script>
      <script type="text/javascript">
         $(function(){
              $("#text").anythingZoomer({
                 expansionSize: 30,
                 speedMultiplier: 1.5
              });
              $("#photo").anythingZoomer({
                 expansionSize: 30,
                 speedMultiplier:2.5,
                 smallArea: "#small2",    // Overrides small area ID
                  largeArea: "#large2",    // Overrides large area ID
                  zoomPort: "#overlay2",   // Overrides zoom overlay area ID
                  mover: "#mover2"         // Overrides mover ID
              });
         });
      </script>
      <style type="text/css">
         #text, #photo      { width: 500px; position: relative; }
         #small, #small2      { position: relative; width: 100%; }
         #large, #large2      { background: white; position: relative; width: 600px; }
         #mover, #mover2      { position: absolute; top: 0; left: 0; width: 104px; height: 104px; overflow: hidden; z-index: 100; background: white; display: none; }
         #overlay, #overlay2   { border: 1px solid blue; width: 102px; height: 102px; position: absolute; top: 0; left: 0; z-index: 200; }
         #small p         { font-size: 8px; }
      </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>設置サンプル</h1>
         <p>参照:<a href='http://css-tricks.com/examples/AnythingZoomer/image.php' target='_blank'>AnythingZoomer</a></p>
<!-- CODE -->
<h2>テキスト</h2>
<div id="text">
   <div id="small">
      <p style="width:500px">テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。<br>テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。<br>テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。<br>テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。<br>テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。</p>
   </div>
   <div id="mover">
      <div id="overlay"></div>
      <div id="large">
         <p style="width:500px">テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。<br>テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。<br>テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。<br>テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。<br>テキストにマウスオーバーすると、虫めがねのようにテキストを拡大表示します。</p>
      </div>
   </div>
</div>
<h2>画像</h2>
<div id="photo">
   <div id="small2">
      <img src="http://farm5.static.flickr.com/4055/5153644500_b95ccefb3f_m.jpg" alt="small rushmore" />
   </div>
   <div id="mover2">
      <div id="overlay2"></div>
      <div id="large2">
         <img src="http://farm5.static.flickr.com/4055/5153644500_b95ccefb3f_z.jpg" alt="big rushmore" />                     
      </div>
   </div>
</div>
<!-- / CODE -->
      </div>
   </body>
</html>