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

実行結果

Cornerz v0.6 | 設置サンプル

例1

H3要素

例2:枠線なし

border:0; display:"block";

例3:枠線指定

border:5px solid #87c3aa; background:#796c4a; padding:20px; color:#87c3aa;

例4:入れ子

background:#fff;color:#87c3aa; font-weight:bold; padding:10px;

例5:幅を指定

border:1px solid #000;
color:#fff;
background:#87c3aa;
display:block
width:200px;

例6:インライン

3px solid #796c4a; display:inline;
インライン。

例7:タブ風

タブ
なが~~~~いタブ
...
pink
yellow
yellow
#fcf

設置サンプルのソース

<!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>Cornerz v0.6 | 設置サンプル</title>
      <link rel="stylesheet" type="text/css" href="/content/lib/global.css" />
      <!-- JS -->
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
      <script type="text/javascript" src="/content/lib/jquery/cornerz.js"></script>
      <script type="text/javascript">
         $(function(){
              $('.curve').cornerz();
              $('#xxx').cornerz({radius:50});
              $('.curveC').cornerz({radius:30, corners:"tl br"});
              $('.curveD').cornerz({radius:10});
              $('.tab').cornerz({radius:10, corners:"tl tr"});
              $('h3').cornerz({radius:40, borderWidth:0, corners: "tl"});
         });
      </script>
      <!-- CSS -->
      <style type="text/css">
         body { background-color:#fff; }
         h3 { margin:20px 0; padding:5px 5px 5px 20px; background:#333; color:#fff; z-index:1000; display:inline; font-size:15px; }
         #xxx { background:url(/content/img/pattern.jpg); }
         .tab { margin:10px 5px 10px 10px; padding:2px 5px; border:1px solid #000; border-bottom:0; background:#ccc; display:inline; float:left; }
         .tab:hover { background:#000; color:#fff; cursor:pointer }
         .test1 { margin:10px; padding:2px; background:#87c3aa; text-align:center; text-transform:lowercase; }
         .test1:hover { background:#796c4a; color:#fff; cursor:pointer; }
      </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://labs.parkerfox.co.uk/cornerz/'>Cornerz v0.6</a> | 設置サンプル</h1>
<!-- CODE -->
         <h2>例1</h2>
         <h3>H3要素</h3>

         <h2>例2:枠線なし</h2>
         <div class="curve test1" style="border:0;">border:0; display:"block";</div>

         <h2>例3:枠線指定</h2>
         <div class="curve test1" style="border:5px solid #87c3aa; background:#796c4a; padding:20px; color:#87c3aa;">border:5px solid #87c3aa; background:#796c4a; padding:20px; color:#87c3aa;</div>

         <h2>例4:入れ子</h2>
         <div id="xxx" class="curve50 test1" style="border:10px solid #87c3aa; color:#0a0; line-height:100px;">
            <span style="background:#fff; color:#87c3aa; font-weight:bold; padding:20px;">
               background:#fff;color:#87c3aa; font-weight:bold; padding:10px;
            </span>
         </div>

         <h2>例5:幅を指定</h2>
         <div class="curve test1" style="border:1px solid #000; color:#fff; background:#87c3aa; display:block; width:200px;" >border:1px solid #000;<br>color:#fff;<br>background:#87c3aa;<br>display:block<br> width:200px;</div>

         <h2>例6:インライン</h2>
         <div class="curve test1" style="border:3px solid #796c4a;  display:inline;">3px solid #796c4a;  display:inline;</div>インライン。

         <h2>例7:タブ風</h2>
         <div class="cf">
            <div class='tab'>タブ</div>
            <div class='tab'>なが~~~~いタブ</div>
            <div class='tab'>...</div>
            <div class='tab' style=' background: pink' >pink</div>
            <div class='tab' style=' background: yellow' >yellow</div>
            <div class='tab' style=' background: yellow' >yellow</div>
            <div class='tab' style=' background: #fcf'>#fcf</div>
         </div>
<!-- / CODE -->
      </div>
   </body>
</html>