実行結果
角丸
新宿サザンテラスにいつも長蛇の列を作っている人気のドーナツ屋さん「クリスピー・クリーム・ドーナツ(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>curvyCorners | 設置サンプル</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/curvycorners.js"></script>
<script type="text/javascript">
$(function(){
settings = {
tl:{ radius:20 },
tr:{ radius:20 },
bl:{ radius:20 },
br:{ radius:20 },
antiAlias:true,
autoPad:true,
validTags:["div"]
}
var myBoxObject = new curvyCorners(settings, "mybox1");
myBoxObject.applyCornersToAll();
var myBoxObject2 = new curvyCorners(settings, "mybox2");
myBoxObject2.applyCornersToAll();
var myBoxObject3 = new curvyCorners(settings, "mybox3");
myBoxObject3.applyCornersToAll();
});
</script>
<!-- CSS -->
<style type="text/css">
.wrap { width:420px; text-align:center; margin:0; padding:70px 0; background:transparent url(/content/img/pattern.jpg) repeat 0 0; }
.mybox1 { margin:0 auto; padding:20px; border:0px solid #fff; color:#fff; width:60%; text-align:left; background-color:#85bca7; border:3px solid #fff; }
.mybox2 { margin:0 auto; color:#fff; width:320px; height:200px; text-align:left; background:transparent url("http://farm4.static.flickr.com/3222/2974008614_736e2d5b50.jpg") no-repeat 0 0; }
.mybox3 { margin:0 auto; color:#fff; width:320px; height:200px; text-align:left; background-image:url("http://farm4.static.flickr.com/3222/2974008614_736e2d5b50.jpg"); background-repeat:no-repeat; border:5px solid #85bca7; }
</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 & JavaScript Room</a> :: 設置サンプル</h1>
<h3 class='h'>実行結果</h3>
<div id="wrap">
<h1><a href='http://www.curvycorners.net/index.php'>curvyCorners</a> | 設置サンプル</h1>
<!-- CODE -->
<h2>角丸</h2>
<div class="wrap">
<div class="mybox1">
新宿サザンテラスにいつも長蛇の列を作っている人気のドーナツ屋さん「クリスピー・クリーム・ドーナツ(Krispy Kreme Doughnuts)」。ドーナツの箱がピザの箱みたいでアメリカン!すごく甘いのかと思ってたら、意外とほどよい甘さ。生地はややわらかくてふんわりしてました!
</div>
</div>
<h2>角丸(背景画像指定)</h2>
<div class="wrap">
<div class="mybox2"></div>
</div>
<h2>画像(背景画像指定+枠線付き)</h2>
<div class="wrap">
<div class="mybox3"></div>
</div>
<!-- / CODE -->
</div>
</body>
</html>