CSS製作漂亮的蘋果風格Dock Menu(源檔案)

來源:互聯網
上載者:User
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



相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.