• 大小: 0.21M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-01-30
  • 语言: JavaScript
  • 标签: jQuery  

资源简介

【实例简介】

用jquery实现鱼眼效果 


 

【核心代码】

<html>
	<head>
		<title>鱼眼测试</title>
		<script type="text/javascript" src="./js/jquery-1.8.3.js"></script>   
    	<script type="text/javascript" src="./js/fisheye-iutil.min.js"></script>
    	
    	<style type="text/css">
			#dock{
				clear:both;
				width:1236px;
				height:240px;
				position:relative;
				top:50px;
				left:-50px;
				border:0px solid red;
			}
			.dock_container{
				position:absolute;
				height:200px;
				border:0px solid yellow;
			}
			a.dock_items {
				display: block; 
				font:12px Arial, Helvetica, sans-serif;
				width: 30px; 
				color: #777777; 
				bottom: 0px; 
				position: absolute;
				text-align: center;
				text-decoration: none;
				border:0px solid blue;
			}
			.dock_items span {
				display: none;
			}
			.dock_items img {
				border: none; 
				margin: 5px 0px 0px; 
				width: 100%; 
			}
    	
    	</style>
    	<script charset="GBK" type="text/javascript">
    	$(document).ready(
    		function()
    		{																																									
				$("#dock").Fisheye({
					maxWidth:70,
					items:"a",
					itemsText:"span",
					container:".dock_container",
					itemWidth:75,
					proximity:70,
					alignment:"left",
					valign:"bottom",
					halign:"center"
				});    		
			}
    	);
    </script>
	</head>
	
	<body>
		<div id="dock">
      		<div class="dock_container">
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/5e49a3e4-4127-4749-8f8f-cdfdede36932.jpg"/>
	      			<span><br />华为 荣耀6 plus<br /><br />¥2499元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">	
	      			<img src="./images/66372197-7f57-435a-a6ad-cfa37c59f378.jpg"/>
	      			<span><br />华为麦芒3<br /><br />¥1599元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">	
	      			<img src="./images/886380a0-b23e-4041-b67c-27bfa52dd6cb.jpg"/>
	      			<span><br />酷派大神F2<br /><br />¥899元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/9152d8e9-c6b2-46ad-9c06-55849454bccd.jpg"/>
	      			<span><br />酷派铂顿<br /><br />¥4680元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/2504a690-6161-46ce-8f81-e06b08c9dd5f.jpg"/>
	      			<span><br />小米LED灯<br /><br />¥25元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/84e56dfa-b134-4275-8f4e-e1df22c3d80c.jpg"/>
	      			<span><br />三星A3<br /><br />¥1999元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/0408cac6-897b-4c7b-9335-5865236ae2ad.jpg"/>
	      			<span><br />三星NOTE4<br /><br />¥4488元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/8f4f080a-fa48-4754-a237-056af84fcf49.jpg"/>
	      			<span><br />语音卡<br /><br />¥9元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/82e83667-fab8-4717-981c-90e5bec464a4.jpg"/>
	      			<span><br />iPhone6P<br /><br />¥5888元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/cd35f24d-1d79-4026-9e87-9c79c709a44e.jpg"/>
	      			<span><br />小米4<br /><br />¥1999元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/b823aafb-c325-4f26-9f0d-abd3615259a1.jpg"/>
	      			<span><br />iPhone6<br /><br />¥5088元</span>
	      		</a>	
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/d5fa504a-2a40-4895-93ac-f63ec44cff6d.jpg"/>
	      			<span><br />一卡双号<br /><br />¥10元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/cd8c43d4-8b86-4b24-a19e-f3e4470ec143.jpg"/>
	      			<span><br />魅蓝note<br /><br />¥1099元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/3196ec8f-4638-4dd5-94c6-8d0939a7f975.jpg"/>
	      			<span><br />8G内存卡<br /><br />¥35元</span>
      			</a>
      			<a class="dock_items" href="javascript:void(0);">
	      			<img src="./images/6d6b9d51-ae1d-45c7-89ce-fae71da9ccae.jpg"/>
	      			<span><br />华为荣耀4X<br /><br />¥999元</span>
      			</a>
      		</div>
      	</div>
	</body>
</html>

资源截图

代码片段和文件信息

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       7510  2015-04-02 08:40  js\fisheye-iutil.min.js

     文件      93637  2015-04-02 08:40  js\jquery-1.8.3.js

     文件       4577  2015-08-27 19:03  fisheye.html

     文件      16134  2015-04-02 08:40  images\0408cac6-897b-4c7b-9335-5865236ae2ad.jpg

     文件       8976  2015-04-02 08:40  images\2504a690-6161-46ce-8f81-e06b08c9dd5f.jpg

     文件      10018  2015-04-02 08:40  images\3196ec8f-4638-4dd5-94c6-8d0939a7f975.jpg

     文件      12256  2015-04-02 08:40  images\5e49a3e4-4127-4749-8f8f-cdfdede36932.jpg

     文件      11220  2015-04-02 08:40  images\66372197-7f57-435a-a6ad-cfa37c59f378.jpg

     文件      20076  2015-04-02 08:40  images\6d6b9d51-ae1d-45c7-89ce-fae71da9ccae.jpg

     文件      14487  2015-04-02 08:40  images\82e83667-fab8-4717-981c-90e5bec464a4.jpg

     文件      11199  2015-04-02 08:40  images\84e56dfa-b134-4275-8f4e-e1df22c3d80c.jpg

     文件       9799  2015-04-02 08:40  images\886380a0-b23e-4041-b67c-27bfa52dd6cb.jpg

     文件      10218  2015-04-02 08:40  images\8f4f080a-fa48-4754-a237-056af84fcf49.jpg

     文件       8047  2015-04-02 08:40  images\9152d8e9-c6b2-46ad-9c06-55849454bccd.jpg

     文件      14487  2015-04-02 08:40  images\b823aafb-c325-4f26-9f0d-abd3615259a1.jpg

     文件      13291  2015-04-02 08:40  images\cd35f24d-1d79-4026-9e87-9c79c709a44e.jpg

     文件      13892  2015-04-02 08:40  images\cd8c43d4-8b86-4b24-a19e-f3e4470ec143.jpg

     文件      19664  2015-04-09 11:10  images\d5fa504a-2a40-4895-93ac-f63ec44cff6d.jpg

     目录          0  2015-08-27 19:00  js

     目录          0  2015-08-27 19:09  images

----------- ---------  ---------- -----  ----

               299488                    20


评论

共有 条评论