spacegallery是一款JQuery图片由到近特效插件,此插件富有空间感,顿时让人耳目一新。
参数说明:
border //整数,图片边框,默认是: 0
duration //整数,动画持续时间,默认:800
perspective //整数,透视高度,默认: 140
minScale //整型,背后图像的最小比例, 默认: 0.2
loadingClass //字符串,加载图片时候把CSS样式加到元素里面,默认: null
before //函数,下一个图片之前触发
after //函数,下一个图片之后触发
(下载的附件中带有DEMO)
<div id="myGallery">
<img src="images/bw3.jpg" alt="" />
<img src="images/lights3.jpg" alt="" />
<img src="images/bw2.jpg" alt="" />
<img src="images/lights2.jpg" alt="" />
<img src="images/bw1.jpg" alt="" />
<img src="images/lights1.jpg" alt="" />
</div>
[css]
<link rel="stylesheet" media="screen" type="text/css" href="http://www.ijquery.cn/js/spacegallery.css" />
<style type="text/css">
#myGallery{width:400px;height:300px;}
.spacegallery {
position: relative;
overflow: hidden;
}
.spacegallery img {
position: absolute;
left: 50%;
}
.spacegallery a {
position: absolute;
z-index: 1000;
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url(images/blank.gif);
}
</style>
[/css]
<script type="text/javascript">
$(function(){
$('#myGallery').spacegallery();
});
</script>
官方地址:https://www.eyecon.ro/spacegallery/#implement