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

実行結果

Setting Equal Heights with jQuery | 設置サンプル

通常の表示

クリスピー・クリーム・ドーナツ

新宿高島屋のサザンテラスにいつも長蛇の列を作っている人気のドーナツ屋さん。

ドーナツの箱がピザの箱みたいで、味もアメリカン!ビジュアルから行ってさぞかし劇甘なんだろうなと思ったけど、意外とほどよい甘さ。

生地はかなりソフトなので固めでサクサクしたドーナツが好きな人にはおすすめできないかもw

equalHeights.jsで高さを揃えて表示

クリスピー・クリーム・ドーナツ

新宿高島屋のサザンテラスにいつも長蛇の列を作っている人気のドーナツ屋さん。

ドーナツの箱がピザの箱みたいで、味もアメリカン!ビジュアルから行ってさぞかし劇甘なんだろうなと思ったけど、意外とほどよい甘さ。

生地はかなりソフトなので固めでサクサクしたドーナツが好きな人にはおすすめできないかもw

設置サンプルのソース

<!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.3/jquery.min.js"></script>
      <script type="text/javascript" src="/content/lib/jquery/jQuery.equalHeights.js"></script>
      <script type="text/javascript">
          $(function(){ $('#equalize').equalHeights(); });
         </script>
         <!-- CSS -->
      <style type="text/css">
         body{ margin:20px; padding:0; font:12px/1.5 verdana,sans-seif; }
         h1 { font-size:150%; }
         h2 { font-size:120%; }
         /* equalHeights */
         .container { width:100%; padding:0 0 2em; }
         .box { float:left; width:24%; margin-right:1%; background-color:#c9efbe; }
         .box p { margin:.5em; padding:0; }
         .containWidth {width: 480px;}
      </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://www.filamentgroup.com/examples/equalHeights/'>Setting Equal Heights with jQuery</a> | 設置サンプル</h1>
<!-- CODE -->
         <div class="containWidth">
            <h2>通常の表示</h2>
            <div class="cf">
               <div class="container">
                  <div class="box"><p>クリスピー・クリーム・ドーナツ</p></div>
                  <div class="box"><p>新宿高島屋のサザンテラスにいつも長蛇の列を作っている人気のドーナツ屋さん。</p></div>
                  <div class="box"><p>ドーナツの箱がピザの箱みたいで、味もアメリカン!ビジュアルから行ってさぞかし劇甘なんだろうなと思ったけど、意外とほどよい甘さ。</p></div>
                  <div class="box"><p>生地はかなりソフトなので固めでサクサクしたドーナツが好きな人にはおすすめできないかもw</p></div>
               </div>
            </div>
            <h2>equalHeights.jsで高さを揃えて表示</h2>
            <div class="cf">
               <div class="container" id="equalize">
                  <div class="box"><p>クリスピー・クリーム・ドーナツ</p></div>
                  <div class="box"><p>新宿高島屋のサザンテラスにいつも長蛇の列を作っている人気のドーナツ屋さん。</p></div>
                  <div class="box"><p>ドーナツの箱がピザの箱みたいで、味もアメリカン!ビジュアルから行ってさぞかし劇甘なんだろうなと思ったけど、意外とほどよい甘さ。</p></div>
                  <div class="box"><p>生地はかなりソフトなので固めでサクサクしたドーナツが好きな人にはおすすめできないかもw</p></div>
               </div>
               </div>
         </div>
<!-- / CODE -->
      </div>
   </body>
</html>