要构建垂直导航栏,您可以尝试运行以下代码。
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 5;
padding: 5;
}
li a {
display: block;
width: 70px;
background-color: orange;
}
</style>
</head>
<body>
<ul>
<li><a href = "#home">Home</a></li>
<li><a href = "#company">Company</a></li>
<li><a href = "#product">Product</a></li>
<li><a href = "#services">Services</a></li>
<li><a href = "#contact">Contact</a></li>
</ul>
</body>
</html>