DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> WEB網站前端 >> 網頁特效代碼 >> 使用HoverTreeShow插件彈出遮罩層顯示大圖
使用HoverTreeShow插件彈出遮罩層顯示大圖
編輯:網頁特效代碼     
使用jQuery插件HoverTreeShow彈出遮罩層顯示大圖

效果體驗:
http://hovertree.com/texiao/hovertreeshow/

在開發HoverTreeTop項目的產品展示功能過程中,因為要把產品圖片的大圖顯示給用戶看,就使用jQuery制作了一個插件:HoverTreeShow ,使用該插件可以很方便的彈出圖片的大圖,已經運用在項目中了,除了上面鏈接的示例外,HoverTreeTop項目的產品展示也是一個實例,請訪問鏈接:http://hovertree.com/top/htpro/5dbcb599663b3397.htm

HoverTreeTop是一個ASP.NET開源項目,用於企業網站建設,裡面也包含HoverTreeShow插件的源碼,有需要的朋友可以下載源碼:http://hovertree.com/h/bjaf/hv6cqe5n.htm

彈出層後,可以點擊右上角的 X 按鈕關閉,也可以雙擊頁面關閉層。

使用該插件的關鍵代碼:
 <link href="http://hovertree.com/texiao/hovertreeshow/hovertreeshow.css" rel="stylesheet" />
<script src="http://hovertree.com/texiao/hovertreeshow/hovertreeshow.js"></script>
<div class="hovertreeshow">
<img src='http://hovertree.com/hvtimg/bjafjd/hs6oi257.jpg' /></div>
完整代碼如下:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>使用HoverTreeShow插件彈出圖片大圖層_何問起</title><base target="_blank" />
<meta charset="utf-8" />
<link href="http://hovertree.com/texiao/hovertreeshow/hovertreeshow.css" rel="stylesheet" />
<script src="http://down.hovertree.com/jquery/jquery-1.12.1.min.js"></script>
<style>#hovertreeshow{
width:400px;height :400px;overflow:scroll;margin:5px auto;}
#hovertreeshow img{max-height:100%;}
#headhovertree{margin:5px auto;width:400px;}a{color:blue;}
</style>
</head>
<body>
<div id="headhovertree"><h3>使用HoverTreeShow插件彈出圖片大圖層</h3>
請點擊下方圖片,將彈出遮罩層顯示圖片原圖。<a href="http://hovertree.com/h/bjag/o46xlsnm.htm">說明</a> <a href="http://hovertree.com">首頁</a></div>
<div id="hovertreeshow" class="hovertreeshow">
<img src='http://hovertree.com/hvtimg/bjafjd/hs6oi257.jpg' /><img src='http://hovertree.com/hvtimg/bjafjd/070joeh7.jpg' />
<img src="http://hovertree.com/hvtimg/201512/o9qashmi.gif" />
</div>
<div style="height:600px;width:100%"></div>
<script src="http://hovertree.com/texiao/hovertreeshow/hovertreeshow.js"></script>
</body>
</html>
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved