<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>导航栏</title>
<style>
*{
margin: 0px;
}
div{
width: 650px;
height: 30px;
background-color: rgba(10, 15, 43, 0.878);
border-radius:10%;
text-align: center;
margin: auto;
}
li{
list-style:none;
display:inline-block;
color: aliceblue;
box-shadow:10px 10px 15px gray;
}
.box:hover{
background-color:red ;
}
</style>
</head>
<body>
<div >
<li class="box">游戏1</li>
<li class="box">游戏2</li>
<li class="box">游戏3</li>
<li class="box">游戏4</li>
<li class="box">游戏5</li>
<li class="box">游戏6</li>
<li class="box">游戏7</li>
<li class="box">游戏8</li>
<li class="box">游戏9</li>
</div>
<body>
</html>
运行截图: