css
效果如下:
1、下載本執行個體中的所有內容:
點擊這裡下載源檔案
2、插入代碼:
在<head>標籤裡放入下面代碼:
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/interface.js"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
<!--[if lt IE 7]>
<style type="text/css">
.dock img { behavior: url(iepngfix.htc) }
</style>
<![endif]–>
3. 設定
把下面代碼放到<body>標籤內。
<script type="text/javascript">
$(document).ready(
function()
{
$(’#dock2′).Fisheye(
{
maxWidth: 60,
items: ‘a’,
itemsText: ’span’,
container: ‘.dock-container2′,
itemWidth: 40,
proximity: 80,
alignment : ‘left’,
valign: ‘bottom’,
halign : ‘center’
}
)
}
);
</script>
4.添加或移除項目
<a class="dock-item" href="#"><img src="http://www.webjx.com/htmldata/2007-05-22/images/home.png" alt="home" /><span>Home</span></a>
<a class="dock-item2" href="#"><span>Home</span><img src="http://www.webjx.com/htmldata/2007-05-22/images/home.png" alt="home" /></a>
允許的瀏覽器:IE 6, IE 7, Opera 9, Firefox 2, Safari 2
原文串連:http://www.ndesign-studio.com/blog/mac/css-dock-menu