html5 jquery幻燈片插件分割線前后圖片對比效果



104 414 139



特效描述: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.cqetom.live"><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.cqetom.live" 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.cqetom.live" 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

加群請備注:從官網了解到

老夫子电子