<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>图片前后对比</title>
</head>
<body>
<div class="beforeafter">
<img src="images/before.jpg" alt="before" height="420" width="748"/>
<img src="images/after.jpg" alt="after" height="420" width="748"/>
</div>
</body>
</html>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.beforeafter-1.4.js"></script>
<script type="text/javascript">
$(function(){
$('.beforeafter').beforeAfter({
imagePath: 'images/'
});
});
</script>
<span style="font-size:14px;word-wrap: break-word; font-family: 微软雅黑, Tahoma, Helvetica, SimSun, sans-serif;">showFullLinks:是否显示下面的链接,点击链接,将自动显示完整的前或后的图片,默认值:true</span><br style="word-wrap: break-word; font-family: 微软雅黑, Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px; line-height: 25px;" /><span style="font-size:14px;word-wrap: break-word; font-family: 微软雅黑, Tahoma, Helvetica, SimSun, sans-serif;">imagePath:导航图片的路径(绝对路径或相对路径),导航图片指的是中间绿色条以及左右三角,默认值:/js/beforeAfter/</span><br style="word-wrap: break-word; font-family: 微软雅黑, Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px; line-height: 25px;" /><span style="font-size:14px;word-wrap: break-word; font-family: 微软雅黑, Tahoma, Helvetica, SimSun, sans-serif;">beforeLinkText:设置前图片下面链接的文字,默认值:Show only before</span><br style="word-wrap: break-word; font-family: 微软雅黑, Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px; line-height: 25px;" /><span style="font-size:14px;word-wrap: break-word; font-family: 微软雅黑, Tahoma, Helvetica, SimSun, sans-serif;">afterLinkText:设置后图片下面链接的文字,默认值:Show only after</span><br style="word-wrap: break-word; font-family: 微软雅黑, Tahoma, Helvetica, SimSun, sans-serif; font-size: 14px; line-height: 25px;" />
<a target=_blank href="http://www.html5cn.org/article-6470-1.html">http://www.html5cn.org/article-6470-1.html</a>
<a target=_blank href="http://www.catchmyfame.com/catchmyfame-jquery-plugins/jquery-beforeafter-plugin/">http://www.catchmyfame.com/catchmyfame-jquery-plugins/jquery-beforeafter-plugin/</a>