我是CSS和HTML的新手,遇到了一個讓我完全陷入困境的問題 - 我應用於導航欄的過渡效果看起來並不像生效。我尋找了一個無濟於事的答案,並且準備在這一點上打破一些東西。以下是我的導航欄的CSS。CSS過渡效果不起作用
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
text-align: center;
}
li {
display: inline-block;
font-family: 'Oswald Light', Verdana, Geneva, sans-serif;
font-size: 20px;
background-color: #333;
-webkit-transition: all 0.9s ease;
-moz-transition: all 0.9s ease;
-o-transition: all 0.9s ease;
-ms-transition: all 0.9s ease;
transition: all 0.9s ease;
}
li a {
display: inline-block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover {
background-color: #6699cc;
}
哦我的天哪,它現在有用!非常感謝! – Zeiphex