前一阵在研究JQuery的插件,其中有一款插件(Galleria )可以用来显示图片的,下面是一系列小图片,上面是当前查看的大图,发现用起来很简单,一点也不难。把代码贴在这里跟大家一起分享,效果图我已经传入附件中。
Galleria.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="$!Server/static/js/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="$!Server/static/js/jquery/galleria.js"></script>
<title>Galleria Test</title>
<style type="text/css">
.images{width:500px; height:400px;margin:20px auto}
</style>
<script type="text/javascript">
$(document).ready(function(){
Galleria.loadTheme('$!Server/static/js/jquery/themes/galleria.classic.js');
$('.images').galleria({
image_crop:true,
transition: 'fade',
});
});
</script>
</head>
<body>
<div class="images">
<img src="$!Server/static/images/TestImage/1.gif">
<img src="$!Server/static/images/TestImage/2.gif">
<img src="$!Server/static/images/TestImage/3.gif">
</div>
</body>
</html>