我準備一個WordPress主題,想不通爲什麼:active
在我的CSS,而:hover
工作正常不工作。CSS:懸停的作品,但:積極不
HTML:
(...)
<div id="mainMenu">
<div id="mm_links">
<a id="mm_1" href="index.php/about-icar/">About ICAR</a><br/>
<a id="mm_2" href="">News</a><br/>
<a id="mm_3" href="index.php/for-the-authors/">For the authors</a><br/>
<a id="mm_4" href="index.php/resources/">Resources</a><br/>
<a id="mm_5" href="index.php/contact-promotion/">Contact<br/>& promotion</a><br/>
</div>
<div id="mm_tail"></div>
</div>
(...)
CSS:
div#mainMenu{
float: left;
width: 140px;
height: 430px;
margin-top: 48px;
background-image: url("img/mainMenu.svg");
background-size:cover;
text-align: center;
}
div#mainMenu a{
font-family: 'Raleway', sans-serif;
font-size: 10.6pt;
text-decoration: none;
}
div#mainMenu a:link, div#mainMenu a:visited, div#mainMenu a:active {
color: #262E5B;
}
div#mainMenu a:hover{
color: #262E5B;
}
a#mm_1 {
position: relative;
display: table-cell;
top: 21px;
left: 18px;
width: 120px;
height: 35px;
vertical-align: middle;
}
a#mm_1:hover, a#mm_1:active { <-- THIS IS NOT WORKING
background-image: url('img/ElementAbout.png');
background-size: cover;
}
div#mm_links{
clear:both;
height: 430px;
}
div#mm_tail{
background-color: white;
border-left: 2px solid #262E5B;
border-right: 2px solid #262E5B;
border-bottom: 2px solid #262E5B;
width: 30px;
height: 100%;
clear: both;
float: right;
}
我想有高亮顯示的鏈接,當用戶在頁面的地方以同樣的方式帶領當他移動鼠標時。這不是''active'應該工作的方式嗎? – user31027
號:積極的手段:這樣做,而我點擊的元素。 – tomtom
謝謝你的解釋。 – user31027