Biomod/2014/Kashiwa/test

From OpenWetWare
Jump to: navigation, search

<!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>jCaption | 設置サンプル</title>
       <link rel="stylesheet" type="text/css" href="lib/global.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="lib/jquery/jcaption.js"></script>
       <script type="text/javascript">
           $(function(){
               /* 例1 */
               $('#exp1 img').jcaption();
               /* 例2 */
               $('#exp2 img').jcaption({
                   copyStyle: false,
                   animate: true, /* アニメーションの有無 */
                   show: {height: "show"},
                   hide: {height: "hide"}
               });
       });
       </script>
       <!-- CSS -->
       <style type="text/css">
           /* 例1 */
           #exp1 div.caption { margin:0 10px 10px 0; padding:5px; border:1px solid #ccc; background:#fff; float:left; }
           #exp1 div.right { margin-right:0; }
           div.left { margin-left:0; }
           #exp1 div.caption img { margin:0; padding:0; width:240px; height:180px; }
           #exp1 div.caption p { margin:5px 0 0 0; padding:5px; border-top:1px #ddd dotted; font-size:.9em; }
           /* 例2 */
           #exp2 div.caption { margin:0 10px 10px 2px; padding:0; position:relative; float:left; }
           #exp2 div.caption p { position:absolute; margin:0; padding:2px; font-size:.9em; bottom:0; left:0; background:black; color:white; opacity:.7; }
           #exp2 div.caption img { margin:0; padding:0; }
       </style>
   </head>
   <body>
       <div id="wrap">
           <h1><a href='http://www.newmediacampaigns.com/page/jcaption-a-jquery-plugin-for-simple-image-captions'>jCaption</a> | 設置サンプル</h1>

<!-- CODE -->

           <h2>例1:img要素のalt属性に指定した値をキャプションとして表示</h2>
           <div id="exp1" class="clearfix">
               <img src="http://farm4.static.flickr.com/3514/3274514408_1800118ded_m.jpg" width="240" height="180" alt="アボカド シーザーサラダ@アボガドダイニング Platinum Lounge" />
               <img src="http://farm4.static.flickr.com/3509/3273696567_ebf4ed4381_m.jpg" width="240" height="180" alt="アボカド刺@アボガドダイニング Platinum Lounge" />
           </div>
           <h2>例2:画像にマウスオーバーしたときにキャプションをアニメーションしながらオーバーレイ表示</h2>
           <div id="exp2" class="clearfix">
               <div class="caption"><a href="http://www.flickr.com/photos/22559849@N06/3274514408/" title="アボカド シーザーサラダ@アボガドダイニング Platinum Lounge by php_javascript_room, on Flickr"><img src="http://farm4.static.flickr.com/3514/3274514408_1800118ded_m.jpg" width="240" height="180" alt="アボカド シーザーサラダ@アボガドダイニング Platinum Lounge" /></a></div>
               <div class="caption"><a href="http://www.flickr.com/photos/22559849@N06/3273696567/" title="アボカド刺@アボガドダイニング Platinum Lounge by php_javascript_room, on Flickr"><img src="http://farm4.static.flickr.com/3509/3273696567_ebf4ed4381_m.jpg" width="240" height="180" alt="アボカド刺@アボガドダイニング Platinum Lounge" /></a></div>
           </div>

<!-- / CODE -->

       </div>
   </body>

</html>