欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

jquery插件jquery.beforeafter.js實(shí)現(xiàn)左右拖拽分隔條對(duì)比圖片的方法

 更新時(shí)間:2015年08月07日 17:13:31   作者:皮蛋  
這篇文章主要介紹了jquery插件jquery.beforeafter.js實(shí)現(xiàn)左右拖拽分隔條對(duì)比圖片的方法,可實(shí)現(xiàn)圖片拖拽變換的功能,需要的朋友可以參考下

本文實(shí)例講述了jquery插件jquery.beforeafter.js實(shí)現(xiàn)左右拖拽分隔條對(duì)比圖片的方法。分享給大家供大家參考。具體如下:

左右拖拽切換對(duì)比圖片效果,運(yùn)行效果后,圖片中間有個(gè)拖動(dòng)條,拖動(dòng)左右滑動(dòng),可看到圖片不一樣的效果,女模特的臉變嫩了,呵呵,其實(shí)是用了兩張背景圖片實(shí)現(xiàn)的,這就需要jquery.beforeafter.js插件了,拖動(dòng)時(shí)候的小圖標(biāo)不見了,路徑可以在jquery.beforeafter.js中設(shè)置,不多說(shuō)了。

運(yùn)行效果截圖如下:

在線演示地址如下:

http://demo.jb51.net/js/2015/jquery-beforeafter-js-style-codes/

具體代碼如下:

<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>通過(guò)拖拽展示前后圖片對(duì)比效果的jQuery插件jquery.beforeafter</title>
<script type="text/javascript" src="js/jquery-1.6.2.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.3.min.js"></script>
<script type="text/javascript">
$(function(){
  $('#container').beforeAfter({imagePath:'js/'});
  $('#container1').beforeAfter({imagePath:'js/'});
  $('#container2').beforeAfter({imagePath:'js/'});
  $('#container3').beforeAfter({imagePath:'js/'});
  $('#container4').beforeAfter({imagePath:'js/'});
  $('#container5').beforeAfter({imagePath:'js/'});
  $('#container6').beforeAfter({imagePath:'js/'});
});
</script>
 <style> html{display : none ; } </style>
 <script>
 if( self == top ) {
  document.documentElement.style.display = 'block' ; 
 } else {
  top.location = self.location ; 
 }
 </script>
<style type="text/css">
body {
  background: #ccc;
}
#content {
  margin:0 auto;
  width:755px;
}
#container + div.balinks {
<!--margin-left: 200px; -->
}
</style>
</head>
<body>
<div id="content">
<div id="container3">
<div><img alt="before" src="images/blonde1_before.jpg" width="326" height="495" /></div>
<div><img alt="after" src="images/blonde1_after.jpg" width="326" height="495" /></div>
</div>
</div>
</body>
</html>

希望本文所述對(duì)大家的jquery程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論