代碼答案之一
<!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>3.1頁面頭部制作練習題</title>
<style type="text/css">
/*在此定義相關樣式,控制列表的顯示形式*/
li {
? ? width: 50px;
? ? height: 30px;
? ? float: left;
? ? list-style: none;
? ? text-align: center;
? ??
}
a {
? ? display: block;
? ? line-height: 30px;
? ??
}
li a:link, li a:visited {
? ? color: black;
? ? text-decoration: none;
}
li a:hover, li a:active {
? ? color: white;
? ? background-color: #BE3948;
? ? text-decoration: none;
}
</style>
</head>
<body>
<h3>課程難度</h3>
<!--在此制作一個無序列表-->
<ul>
? ? <li><a href="">全部</a></li>
? ? <li><a href="">初級</a></li>
? ? <li><a href="">中級</a></li>
? ? <li><a href="">高級</a></li>
</ul>
</body>
</html>
2021-10-11
感謝一下吧,不錯寫得