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

実行結果

Flip!0.4 - A jQuery plugin | 設置サンプル

Krispy Kreme Doughnuts!!
下→上 上→下 左→右 右→左

設置サンプルのソース

<!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>Setting Equal Heights with jQuery | 設置サンプル</title>
      <link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
      <!-- JS -->
      <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-ui-personalized-1.6rc2.packed.js"></script>
      <script type="text/javascript" src="/content/lib/jquery/jquery.flip.js"></script>
      <script type="text/javascript">
         $(function(){
            $("#flipBT").click(function(){
               $("#flipBox").flip({
                  direction: 'bt',
                  color: '#D46419',
                  speed: 400,
                  content: "<div class='demo_one'>Krispy Kreme Doughnuts!!</div>"
               });
            });
            $("#flipTB").click(function(){
               $("#flipBox").flip({
                  direction: 'tb',
                  color: '#B34212',
                  speed: 600,
                  content: "<div class='demo_two'>くまさんケーキ</div>"
               });
            });
            $("#flipLR").click(function(){
               $("#flipBox").flip({
                  direction: 'lr',
                  color: '#341405',
                  content: "<div class='demo_three'>CAFE EAT@代官山</div>"
               });
            });
            $("#flipRL").click(function(){
               $("#flipBox").flip({
                  direction: 'rl',
                  color: '#166665',
                  speed: 550,
                  content: "<div class='demo_four'>銀座GINTO<br>Birthday Cake!</div>"
               });
            });
            
         });
      </script>
      <!-- CSS -->
      <style type="text/css">
         #flipBox {
            width:320px;
            height:240px;
            margin:0 auto;
            background-color:#000;
            color:#fff;
            font-weight:bold;
            font-size:24px;
         }
         #flipBox > * {
            padding:10px;
         }
         div#buttons {
            width:320px;
            margin:0 auto;
            margin-top:25px;
         }
            #buttons a {
               padding:5px 20px;
               border-bottom:1px solid #000;
               border-right:1px solid #000;
               color:#fff;
               background-color:#333;
               text-decoration:none;
               font-size:11px;
            }
         /* ** demo ** */
         .demo_one {
            background-image: url('http://farm4.static.flickr.com/3141/2973155055_385036c286_o.png');
            background-repeat: no-repeat;
            background-position:0 0;
            width: 100%;
            height: 100%;
         }
         .demo_two {
            background-image: url('http://farm4.static.flickr.com/3222/2974008614_f4b59bf651_o.png');
            background-repeat: no-repeat;
            background-position:0 0;
            width: 100%;
            height: 100%;
         }
         .demo_three {
            background-image: url('http://farm4.static.flickr.com/3174/2973352946_3814779ceb_o.jpg');
            background-repeat: no-repeat;
            background-position:0 0;
            width: 100%;
            height: 100%;
         }
         .demo_four {
            background-image: url('http://farm4.static.flickr.com/3288/2970998187_50bee2de0c_o.jpg');
            background-repeat: no-repeat;
            background-position:0 0;
            width: 100%;
            height: 100%;
         }
      </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://lab.smashup.it/flip/'>Flip!0.4 - A jQuery plugin</a> | 設置サンプル</h1>
<!-- CODE -->
         <div id="flipBox">
            <div class="demo_one">Krispy Kreme Doughnuts!!</div>
         </div>
         <div id="buttons">
            <a id="flipBT" href="#">下→上</a>
            <a id="flipTB" href="#">上→下</a>
            <a id="flipLR" href="#">左→右</a>
            <a id="flipRL" href="#">右→左</a>
         </div>
<!-- / CODE -->
      </div>
   </body>
</html>