PIROBOX的官网的颜色是黑色的!看来意大利人喜欢黑色啊!这是个还算不错的jQuery暗箱/光箱(lightbox)插件,特别是用来显示大图的时候!
jquery弹出层pirobox可根据图片大小自动缩放,调用非常简单.
使用步骤
引用:
<link rel="stylesheet" type="text/css" href="css/sansation/stylesheet.css">
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.2.custom.min.js"></script>
<script type="text/javascript" src="js/pirobox_extended.js"></script>
js
piro_speed :打开速度;
bg_alpha:弹出遮罩背景透明度;
<script type="text/javascript">
$(document).ready(function() {
$().piroBox_ext({
piro_speed : 700,
bg_alpha : 0.5,
piro_scroll : true // pirobox always positioned at the center of the page
});
});
</script>
在要弹出链接 a标签中加入 rel="gallery" class="pirobox_gall"
如下
1
<a href="img/26.jpg" rel="gallery" class="pirobox_gall" title="Curious kitten."> <img src="img/26s.jpg" /> </a>