“`html
<li><a href=”#”>Home</a></li>
<li><a href=”#”>About</a></li>
<li><a href=”#”>Contact</a></li>
</ul>
在CSS中,大家可以使用样式设计来修改导航菜单的外观,例如:
“`css
list-style-type: none;
margin: 0;
padding: 0;
display: inline-block;
width: 100%;
height: 20px;
font-size: 16px;
text-align: center;
line-height: 20px;
display: block;
width: 100%;
text-align: center;
padding: 8px 20px;
font-weight: bold;
color: #333;
text-decoration: none;
a:hover {
color: #ddd;
text-decoration: underline;
“`css
list-style-type: none;
margin: 0;
padding: 0;
display: inline-block;
width: 100%;
height: 20px;
font-size: 16px;
text-align: center;
line-height: 20px;
display: block;
width: 100%;
text-align: center;
padding: 8px 20px;
font-weight: bold;
color: #333;
text-decoration: none;
a:hover {
color: #ddd;
text-decoration: underline;
“`css
list-style-type: none;
margin: 0;
padding: 0;
display: inline-block;
width: 100%;
height: 20px;
font-size: 16px;
text-align: center;
line-height: 20px;
display: block;
width: 100%;
text-align: center;
padding: 8px 20px;
font-weight: bold;
color: #333;
text-decoration: none;
a:hover {
color: #ddd;
text-decoration: underline;
通过使用CSS,大家可以轻松地创建一个简单的导航菜单,使网页更加美观和易于使用。