実行結果
設置サンプルのソース
<!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>設置サンプル</title>
<link rel="stylesheet" type="text/css" href="/content/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="/content/lib/jquery/jquery.roundabout-1.0.js"></script>
<script type="text/javascript" src="/content/lib/jquery/jquery.easing.1.3.js"></script>
<script type="text/javascript">
$(function(){
$('ul#myRoundabout').roundabout();
});
</script>
<!-- CSS -->
<style type="text/css">
.wrap {
margin:0 auto; padding:10px 30px;
background:#fff;
border:1px solid #ccc;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
width:600px;
}
ul {
list-style:none;
}
li {
list-style:none;
}
</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>設置サンプル</h1>
<p>【参照】<a href="http://fredhq.com/projects/roundabout/">jQuery Roundabout</a></p>
<!-- CODE -->
<h2>基本</h2>
<style type="text/css">
#example1 .roundabout-holder {
width:90%;
height:10em;
margin:1em auto;
}
#example1 .roundabout-moveable-item {
width:8em; height:4em;
border:1px dotted #999;
background-color:#f3f3f3;
font-size:2em;
cursor:pointer;
}
#example1 .roundabout-in-focus {
cursor:auto;
}
</style>
<div class="wrap" id="example1">
<ul id="myRoundabout">
<li>Box 1</li>
<li>Box 2</li>
<li>Box 3</li>
<li>Box 4</li>
</ul>
</div>
<h2>要素の周りを回転</h2>
<style type="text/css">
#around {
position:relative;
}
#around .roundabout-holder {
width:32em;
height:12em;
overflow:hidden;
margin:2em auto;
position:relative;
}
#around .roundabout-moveable-item {
width:3em;
height:3em;
border:1px dashed #888;
background-color:#ff0;
opacity:0.5;
text-align:center;
cursor:pointer;
}
#around .roundabout-in-focus {
cursor:auto;
}
.monolith {
background-color:#000;
position:absolute;
width:17em;
top:0; left:7.5em;
z-index:200;
height:40em;
}
.monolith .pad {
padding:1em;
text-align:center;
color:#999;
}
</style>
<script type="text/javascript">
$(function() {
$('.holder').roundabout({
childSelector:'.moveme',
easing:'easeInOutBack',
duration:1400,
maxOpacity:0.7,
minOpacity:0.5,
tilt:-2
});
});
</script>
<div id="around">
<div class="holder">
<div class="monolith">
<div class="pad">
You must move <em>around</em> me.
</div>
</div>
<div class="moveme">OK!</div>
<div class="moveme">OK!</div>
<div class="moveme">OK!</div>
<div class="moveme">OK!</div>
<div class="moveme">OK!</div>
</div>
</div>
<!-- / CODE -->
</div>
</body>
</html>