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

実行結果

設置サンプル

参照:jQuery plugin: Wilq32.RotateImage

jQuery(imgElement).rotate(parameters)

画像を指定した角度に回転

Starbucks Coffee

jQuery(imgElement).rotate(angleValue)

画像の角度を指定

Starbucks Coffee

jQuery(imgElement).rotateAnimation(parameters)

回転アニメーション(画像にマウスオーバーすると画像が回転)

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>設定サンプル</title>
      <link rel="stylesheet" href="/content/lib/global.css" type="text/css" />
      <!-- JS -->
      <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/jQueryRotate.js"></script>
      <script type="text/javascript">
         $(function(){
            /* 画像を指定した角度に回転 */
            $('#image').rotate(-25);
            /* 画像の角度を指定 */
            $('#image2').rotate({angle:5});   
            /* 回転アニメーション */
            var rot=$('#image3').rotate(
               {
                  maxAngle:25,minAngle:-55,
                  bind:[
                     {"mouseover":function(){rot.rotateAnimation(85);}},
                     {"mouseout":function(){rot.rotateAnimation(-35);}}
                  ]
               }
            );
         });
      </script>
   <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://wilq32.googlepages.com/wilq32.rollimage222'>jQuery plugin: Wilq32.RotateImage</a></p>
<!-- CODE -->
         <h2>jQuery(imgElement).rotate(parameters)</h2>
         <p>画像を指定した角度に回転</p>
         <p><img id="image" src="http://farm4.static.flickr.com/3244/3142386073_87c62671a5_m.jpg" width="240" height="180" alt="Starbucks Coffee" /></p>

         <h2>jQuery(imgElement).rotate(angleValue)</h2>
         <p>画像の角度を指定</p>
         <p><img id="image2" src="http://farm4.static.flickr.com/3244/3142386073_87c62671a5_m.jpg" width="240" height="180" alt="Starbucks Coffee" /></p>

         <h2>jQuery(imgElement).rotateAnimation(parameters)</h2>
         <p>回転アニメーション(画像にマウスオーバーすると画像が回転)</p>
         <p><img id="image3" src="http://farm4.static.flickr.com/3244/3142386073_87c62671a5_m.jpg" width="240" height="180" alt="Starbucks Coffee" /></p>
<!-- CODE / -->
      </div>
   </body>
</html>