html5 jquery幻灯片插件分割线前后图片对比效果



101 401 134



特效描述:html5 jquery 幻灯片插件 分割线 前后图片对比,分割线前后图片对比效果

代码结构

1. 引入CSS

<link rel="stylesheet" type="text/css" href="css/style.css" media="screen" />
<link rel="stylesheet" type="text/css" href="css/beforeafter-settings.css" media="screen" />
<link rel="stylesheet" type="text/css" href="css/beforeafter-content.css" media="screen" />
<link href='css/css.css' rel='stylesheet' type='text/css'>

2. 引入JS

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js/freshline/jquery.freshline.demo.js">	</script>
<script type="text/javascript" src="js/freshline/jquery.freshline.beforeafter.js">	</script>
<script type="text/javascript" src="js/freshline/animadrag.js">	</script>

3. HTML代码

<br />
<br />
<!-- 代码 开始 -->
<div id="example" class="beforeafter_slider shadow1">
  <div id="bannerlogo"><a href="http://www.51qianduan.com"><img src="images/nr1.png" /></a></div>
  <ul>
    <li><img src="images/beforeafter/1before.jpg" alt="images/beforeafter/1after.jpg" />
      <div id="textbox_1" class="before">
        <div id="title_1b" class="fadeup">BEFORE</div>
      </div>
      <div id="textbox_1" class="after">
        <div id="title_1b" class="fadeup">AFTER</div>
      </div>
      <div id="textbox_1">
        <div id="logo" class="faderight"><img src="images/yourlogo.png" alt="" /></div>
        <div id="title" class="fadeup">My Sweet Girl</div>
        <div id="description" class="fadeup">Description ipsum dolor sit amet, pericul sapen ius.</div>
      </div>
    </li>
    <li><img src="images/beforeafter/2before.jpg" alt="images/beforeafter/2after.jpg" />
      <div id="textbox_2">
        <div id="logo_2" class="faderight"><img src="images/logo_india.png" alt=""></div>
        <div id="description_2" class="fadeup"><i>Duo numquam assentior et.</i></div>
      </div>
    </li>
    <li><img src="images/beforeafter/3before.jpg" alt="images/beforeafter/3after.jpg">
      <div id="textbox_3">
        <div id="title_3" class="fadeup"><u>My Storyboard</u><br>
          <i>Scene 1</i></div>
      </div>
    </li>
    <li><img src="images/beforeafter/4before.jpg" alt="images/beforeafter/4after.jpg" />
      <div id="textbox_4">
        <div id="logo_4" class="faderight"><img src="images/dr_logo.png" alt="" /></div>
        <div id="description_4" class="fadeup"><a href="http://www.51qianduan.com" target="_new">www.hollywoodplastic.dr</a></div>
      </div>
    </li>
    <li ><img src="images/beforeafter/5before.jpg" alt="images/beforeafter/5after.jpg" />
      <div id="textbox_5">
        <div id="title_5" class="fadeup"><i>Anytime anywhere&nbsp;</i></div>
      </div>
    </li>
    <li ><img src="images/beforeafter/6before.jpg" alt="images/beforeafter/6after.jpg" />
      <div id="textbox_6">
        <div id="logo_6" class="faderight"><img src="images/wine.png" alt="" /></div>
        <div id="title_6" class="fadeup">Feel the Difference!</div>
        <div id="description_6" class="fadeup">Description ipsum dolor sit amet, <br>
          pericula sapentim ei ius.</div>
      </div>
    </li>
    <li ><img src="images/beforeafter/7before.jpg" alt="images/beforeafter/7after.jpg" />
      <div id="textbox_7">
        <div id="logo_7b" class="faderight"><img src="images/anim/flower_1_white_bg_30fps.gif" alt="" /></div>
        <div id="logo_7" class="faderight"><img src="images/tatoologo.png" alt="" /></div>
        <div id="description_7" class="fadeup">Pericula sapentim ei ius.<br>
          <a href="http://www.51qianduan.com" target="_new">www.tatoo.fr</a></div>
      </div>
    </li>
    <li ><img src="images/beforeafter/8before.jpg" alt="images/beforeafter/8after.jpg" />
      <div id="textbox_8">
        <div id="logo_8" class="faderight"><img src="images/yourlogo.png" alt="" /></div>
        <div id="title_8" class="fadeup">Tomato Paste Italy Manufacturers</div>
        <div id="description_8" class="fadeup">Description ipsum dolor sit amet, pericula sapentim ei ius. Pupolo patrioque elaboraret usu et.<br>
          Duo numquam assentior et.</div>
      </div>
    </li>
    <li ><img src="images/beforeafter/9translate_details.jpg" alt="images/beforeafter/9translate_details.jpg">
      <div id="textbox_9" class="before">
        <div id="logo_9" class="faderight"><img src="images/yourlogo.png" alt="" /></div>
        <div id="title_9" class="fadeup">Kriki Choco Item (ENG)</div>
        <div id="description_9" class="fadeup">Details ipsum dolor sit amet, pericula sapentim ei ius. <br>
          Pupolo patrioque elaboraret usu et. Duo numquam assentior et.</div>
      </div>
      <div id="textbox_9" class="after">
        <div id="logo_9" class="faderight"><img src="images/yourlogo.png" alt="" /></div>
        <div id="title_9" class="fadeup">Kriki Choco Item (GER)</div>
        <div id="description_9" class="fadeup">You can define Texts on the first level, second level, or on both.</div>
      </div>
    </li>
    <li ><img src="images/beforeafter/10before.jpg" alt="images/beforeafter/10after.jpg" />
      <div id="textbox_10">
        <div id="title_10" class="fadeup">What is your</div>
        <div id="description_10" class="fadeup">I.D.E.A.?</div>
      </div>
    </li>
  </ul>
</div>
<!--修改幻灯片样式代码-->
<script type="text/javascript">
$(function(){
	$.noConflict();
	jQuery('#demo-content').freshlineDemo_init();
});
</script>
<!--幻灯片代码-->
<script type="text/javascript">
$(function(){
	jQuery('#example').beforeAfter_slider({			
		width:876,
		height:300,
		banner_bordersize:12,
		start_from:'right',
		start_pos:230,
		follow:true,
		timer:4000
	});	
});
</script>
<!-- 代码 结束 -->
<!--
##############################
	HTML DEMO PAGE HERE 
##############################
-->
<div id="big_divider"></div>
<div id="demo-content">
  <div id="grey_head"></div>
  <div class="smallinfo">See how to create individual banners</div>
  <div style="clear:both"></div>
  <div id="panel">
    <div class="smalldeclaration">Background:</div>
    <div style="clear:both"></div>
    <ul id="bgselector">
      <li class="bg1"></li>
      <li class="bg2"></li>
      <li class="bg3"></li>
      <li class="bg4"></li>
      <li class="bg5"></li>
      <li class="bg6"></li>
    </ul>
    <div class="smalldeclaration">Border:</div>
    <div style="clear:both"></div>
    <ul id="borderselector">
      <li class="border1"></li>
      <li class="border2"></li>
      <li class="border3"></li>
      <li class="border4"></li>
      <li class="border5"></li>
      <li class="border6"></li>
    </ul>
    <div style="clear:both"></div>
    <div class="borderstyleselector">
      <div id="rounded" class="rounded">Round</div>
      <div class="seperator"> | </div>
      <div id="square" class="square">Square</div>
      <div id="photo" class="photo">Photo</div>
      <div class="seperator"> | </div>
      <div id="normal" class="normal">Normal</div>
    </div>
    <div style="clear:both"></div>
    <div class="shadowselector">
      <div id="shadow1">Shadow 1</div>
      <div class="seperator"> | </div>
      <div id="shadow2">Shadow 2</div>
      <div class="seperator"> | </div>
      <div id="shadow3">Shadow 3</div>
    </div>
  </div>
  <div id="demo-settings">Demo Settings</div>
  <div id="demo-toolbox">
    <div class="button">1. Example</div>
    <div id="divider"></div>
    <div class="button" onclick="self.location.href='index2.html'">2. Example</div>
  </div>
  <div class="float_title">SOURCE CODE</div>
  <div id="sourcecode-headline">HTML</div>
  <div id="sourcecode">
    <xmp>
      <li> <img src="images/beforeafter/7before.jpg" alt="images/beforeafter/7after.jpg" />
        <div id="textbox_7">
          <div id="logo_7b" class="faderight"> <img src="images/anim/flower_1_white_bg_30fps.gif" alt="" /> </div>
          <div id="logo_7" class="faderight"> <img src="images/tatoologo.png" alt="" /> </div>
          <div id="description_7" class="fadeup"> Pericula sapentim ei ius.<br>
            <a href="http://wwww.codecanyon.net/user/freshline" target="_new">www.tatoo.fr</a> </div>
        </div>
      </li>
    </xmp>
  </div>
  <div class="gray-background"></div>
  <hr />
  <div id="infobox">
    <div id="left_info">Preperation time: 5 min.</div>
    <div id="right_info">Clean Documentation</div>
  </div>
</div>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 滚动 滚动条 页面滚动 滚动插件 滚动条插件 滚动条美化 滑动选项卡 滑动切换 滚动切换 滚动条切换 flash焦点图 flash幻灯片 flashbanner flash图片轮播 拖动 拖拽 拖动插件 拖拽插件 自动滚动图片轮播 选项卡切换 选项卡 切换 tab切换 页面切换 选项卡插件 切换插件 滑动手风琴 延迟加载 无限加载 延迟 加载 切换按钮 表单 表单美化 表单插件 表单美化插件 焦点图 幻灯片 轮播图 bar焦点图 图片拖动 图片拖拽 滚动切换 滚动条切换 加载动画 纯图片轮播 图片轮播 选项卡自动切换 按钮控制

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到