我制作了一个 CSS Navbar,但在每个“navbar-item”之间,空间很小。我根本不希望有任何空间!有没有办法在不改变每个导航栏项目的左边距的情况下实现这一点?
<!doctype html>
<html>
<head>
<title>Home - UnhandyFir9</title>
<style>
#wrapper {
box-shadow: 0px 0px 20px 10px black;
left: 0px;
top: 0px;
margin: auto;
margin-top: 30px;
width: 800px;
background-color: rgb(200, 200, 200);
font-family: sans-serif;
}
#top-notification {
display: inline-block;
width: 100%;
height: 20px;
background-color: lightblue;
text-align: center;
}
#navbar-core {
width: 100%;
height: 30px;
background-color: lightgreen;
}
#navbar-item {
display: inline-block;
width: 100px;
height: 30px;
text-align: center;
background-color: green;
color: white;
}
</style>
</head>
<body>
<div id="wrapper">
<span id="top-notification">== Hi! Our site was just recently launched, so you may expect alot of bugs! Sorry 'bout that! ==</span>
<div id="navbar-core">
<a href="home.html" id="navbar-item">Home</a>
<a href="lessons.html" id="navbar-item">Lessons</a>
<a href="aboutus.html" id="navbar-item">About Us</a>
<a href="donate.html" id="navbar-item">Donate</a>
</div>
</div>
</body>
</html>