我正在制作一个游戏网站,并且我正在使用 DIV 标签作为类型菜单。在制作菜单时,我发现我无法为菜单设置 DIV 元素的大小。如果这很重要,我正在使用。HTML:
<div class="center">
<div class="menu" onclick="location.href='all.html';">All</div>
<div class="menu" onclick="location.href='action.html';">Action</div>
<div class="menu" onclick="location.href='arcade.html';">Arcade</div>
<div class="menu" onclick="location.href='racing.html';">Racing</div>
<div class="menu" onclick="location.href='rpg.html';">PRG</div>
<div class="menu" onclick="location.href='skill.html';">Skill</div>
</div>
<div class="center">
<div class="menu" onclick="location.href='strategy.html';">Strategy/Puzzle</div>
<div class="menu" onclick="location.href='shooting.html';">Shooting</div>
<div class="menu" onclick="location.href='sports.html';">Sports</div>
<div class="menu" onclick="location.href='gamegarage.html';">GameGarage</div>
</div>
CSS:
body
{
background-color:black;
color:rgb(0,255,0);
font-family:"Comic Sans MS";
font-weight:bold;
}
.center
{
text-align:center;
}
.menu
{
font-size:1.35em;
display:inline;
width:250px;
cursor:pointer;cursor:hand;
border:5px solid #00FF00;
}
div
{
margin-bottom:15px;
}
有谁知道我做错了什么?感谢所有的帮助!