CSS替代表格的經典執行個體

來源:互聯網
上載者:User

<!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" lang="gb2312">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>不用表格的菜單</title>

<style type="text/css">
<!--
body {font-size:12px;}
#menu {
MARGIN: 15px 20px 0px 15px;  /*定義層的外邊框距離*/
PADDING:15px;    /*定義層的內邊框為15px*/
BACKGROUND: #dfdfdf;   /*定義背景顏色*/
COLOR: #666;    /*定義字型顏色*/
BORDER:#fff 2px solid;  /*定義邊框為2px白色線條*/
WIDTH:160px;    /*定義內容的寬度為160px*/
}
#menu ul {
MARGIN: 0px;
PADDING: 0px;
BORDER: medium none; /*不顯示邊框*/
LINE-HEIGHT: normal;
LIST-STYLE-TYPE: none}
#menu li {BORDER-TOP: #FFF 1px solid; MARGIN: 0px;}
 #menu li a {
PADDING:5px 0px 5px 15px;
DISPLAY: block;
FONT-WEIGHT: bold;
BACKGROUND: url(http://www.w3cn.org/images/icon_dot_lmenu.gif) transparent no-repeat 2px 8px;
WIDTH: 100%;
COLOR: #444;
TEXT-DECORATION: none;
}
#menu li a:hover { BACKGROUND: url(http://www.w3cn.org/images/icon_dot_lmenu2.gif) #C61C18 no-repeat 2px 8px;
COLOR: #fff; }
-->
</style>
</head>

<body>
<div id="menu">
<ul>
<li><a title="網站標準" href="http://www.w3cn.org/webstandards.html">什麼是網站標準</a></li>
<li><a title="標準的好處" href="http://www.w3cn.org/benefits.html">使用標準的好處</a></li>
<li><a title="怎樣過渡" href="http://www.w3cn.org/howto.html">怎樣過渡</a></li>
<li><a title="相關教程" href="http://www.w3cn.org/tutorial.html">相關教程</a></li>
<li><a title="工具" href="http://www.w3cn.org/tools.html">工具</a></li>
<li><a title="資源及連結" href="http://www.w3cn.org/resources.html">資源及連結</a></li>
</ul>
</div>
</body>
</html>

相關文章

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.