DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> JavaScript入門知識 >> jQuery入門知識 >> JQuery常見問題 >> jquery圖片放大鏡插件使用
jquery圖片放大鏡插件使用
編輯:JQuery常見問題     

點擊這裡查看效果


效果圖:


源碼下載

以下是代碼:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jquery圖片放大鏡使用demo-</title>
</head>
<body>
<script type="text/javascript" src="http:///keleyi/pmedia/jquery/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="http:///keleyi/phtml/jqtexiao/18/jquery.enlarge.js"></script>
<script type="text/javascript">
// http://
$(function () {
$("#demo").enlarge(
{
// 鼠標遮罩層樣式
shadecolor: "#FFD24D",
shadeborder: "#FF8000",
shadeopacity: 0.4,
cursor: "move",

// 大圖外層樣式
layerwidth: 480,
layerheight: 360,
layerborder: "#DDD",
fade: true,

// 大圖尺寸
largewidth: 960,
largeheight: 720
});
});

</script>
<div style="width: 986px; margin: 0px auto;">
<div><h3>jquery圖片放大鏡</h3>把光標移動到下面圖片上 <a href="http:///a/bjad/q2ee2xyt.htm" target="_blank">原文</a></div>
<a href="http:///image/a/5nxma18i.jpg" id="demo" style="position: relative; float: left;">
<img src="http:///image/a/qsqtberv.jpg" width="240" height="180" alt="小圖">
<img src="http:///image/a/5nxma18i.jpg" width="960" height="720" style="display: none;" alt="大圖">
</a>
</div>
</body>
</html>
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved