実行結果
設置サンプルのソース
<!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.largephotobox-0.1.0.js"></script>
<script type="text/javascript">
$(function(){
$('#gallery a').largePhotoBox();
});
</script>
<!-- CSS -->
<style type="text/css">
#jquery-overlay {
position:absolute;
top:0;
left:0;
width:100%;
z-index:90
}
#jquery-largephotobox {
position:fixed;
top:0;
left:0;
width:100%;
z-index:100;
line-height:0;
_position:absolute; /* Fix IE 6 */
_top: expression(document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop + 'px'); /* Fix IE 6 */
_left: expression(document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft + 'px') /* Fix IE 6 */
}
#jquery-largephotobox a img {border:none}
#largephotobox-container {
position:fixed;
top:50%;
left:50%;
_position:absolute; /* Fix IE 6 */
}
#largephotobox-container-image {
position:absolute;
overflow:hidden
}
#largephotobox-image {
position:absolute;
top:0;
left:0
}
#largephotobox-btnclose {
position:absolute;
top:-15px;
right:-15px;
z-index:1
}
#gallery {
background-color:#444;
padding:10px;
width:auto
}
#gallery ul {list-style:none}
#gallery ul li {display:inline}
#gallery ul img {
border:5px solid #3e3e3e;
border-width:5px
}
#gallery ul a {text-decoration:none}
#gallery ul a:hover img {
border:5px solid #fff;
border-width:5px;
color:#fff
}
#gallery ul a:hover {color:#FFF}
</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://code.google.com/p/jquery-largephotobox/'>jquery-largephotobox</a></p>
<!-- CODE -->
<div id="gallery">
<ul>
<li>
<a href="http://farm4.static.flickr.com/3045/3053382294_ef466e1021_o.jpg" title="バースデーケーキ@銀座GINTO">
<img src="http://farm4.static.flickr.com/3045/3053382294_07b552d467_s.jpg" alt="">
</a>
</li>
<li>
<a href="http://farm4.static.flickr.com/3247/3053382326_3ae5064b61_o.jpg" title="バースデーケーキ@銀座GINTO">
<img src="http://farm4.static.flickr.com/3247/3053382326_d457fa52ee_s.jpg" alt="">
</a>
</li>
<li>
<a href="http://farm4.static.flickr.com/3293/3053266638_2b74fbee04_o.jpg" title="アクエリアス・ビーフ@Magic Spice">
<img src="http://farm4.static.flickr.com/3293/3053266638_e1de5c472d_s.jpg" alt="">
</a>
</li>
<li>
<a href="http://farm4.static.flickr.com/3220/3664935670_b94968ccbc_b.jpg" title="ノルディック@オ・タン・ジャディス">
<img src="http://farm4.static.flickr.com/3220/3664935670_b94968ccbc_s.jpg" alt="">
</a>
</li>
<li>
<a href="http://farm4.static.flickr.com/3576/3644950182_2fa2392a36_b.jpg" title="冬瓜の煮物@懐石 川端">
<img src="http://farm4.static.flickr.com/3576/3644950182_2fa2392a36_s.jpg" alt="">
</a>
</li>
</ul>
</div>
<!-- / CODE -->
</div>
</body>
</html>