DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> CSS入門知識 >> CSS詳解 >> CSS特效代碼之background-position另類用法
CSS特效代碼之background-position另類用法
編輯:CSS詳解     

<!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=gb2312" />
<title>讓我們共同推廣WEB標准在中國的發展</title>

<style type="text/CSS">
<!--
ul#menu { width:300px; height:300px; margin:0px auto; padding:0px;  overflow:hidden; background:transparent url(/School/UploadFiles_7810/201104/20110411090959553.jpg)}
ul#menu  li { list-style-type:none; float:left; width:100px; height:100px;}
ul#menu li a { display:block; width:100px; height:100px;  text-decoration:none; background:transparent url(/School/UploadFiles_7810/201104/20110411091000103.jpg) no-repeat 500px 500px;}
a#itemA:hover {background-position: 0 0; }
a#itemB:hover {background-position: -100px 0;}
a#itemC:hover {background-position: -200px 0;}
a#itemD:hover {background-position: 0 -100px;}
a#itemE:hover {background-position: -100px -100px;}
a#itemF:hover {background-position: -200px -100px;}
a#itemG:hover {background-position: 0 -200px;}
a#itemH:hover {background-position: -100px -200px;}
a#itemI:hover {background-position: -200px -200px;}
-->
</style>
</head>

<body>
<ul id="menu">
<li><a id="itemA" href="#" title="Item 1">&nbsp;</a></li>
<li><a id="itemB" href="#" title="Item 2">&nbsp;</a></li>
<li><a id="itemC" href="#" title="Item 3">&nbsp;</a></li>
<li><a id="itemD" href="#" title="Item 4">&nbsp;</a></li>
<li><a id="itemE" href="#" title="Item 5">&nbsp;</a></li>
<li><a id="itemF" href="#" title="Item 6">&nbsp;</a></li>
<li><a id="itemG" href="#" title="Item 7">&nbsp;</a></li>
<li><a id="itemH" href="#" title="Item 8">&nbsp;</a></li>
<li><a id="itemI" href="#" title="Item 9">&nbsp;</a></li>
</ul>
</body>
</Html>

XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved