我想在我的導航欄下有一個簡單的薄邊框,它只有在我懸停的鏈接下才會變得稍微厚一些。我嘗試使用下面的代碼來做這件事,但由於某種原因它不起作用。我如何使它工作?爲什麼這段代碼沒有在導航欄下邊框?
#top-menu ul li a
{
display: block;
float: left;
width: 80px;
max-height: 15px;
text-align: center;
margin: 0;
padding: 10px 0;
text-decoration: none;
font-size: 11pt;
color: rgb(0,0,0);
background-color: rgb(255,255,255);
bottom-border: rgb(0,0,0) solid 2px;
}
#top-menu ul li a:hover
{
bottom-border: rgb(0,0,0) solid 4px;
}
您是否獲得無鼠標懸停時2px的邊界? –
粘貼一些HTML代碼。 www.jsfiddle.net是共享代碼的好方法。 – Gendarme
@Gendarme更好的方法是包含一個可執行的代碼片段。 – Xufox