[英]CSS a:Hover is messing up
我試圖在不同的類上使用單獨的CSS LINK樣式。 當我在鏈接上“懸停”時,鏈接混亂了。 如何解決此問題,以便當我將鼠標懸停在鏈接上時不會顯示不同的CSS樣式?
這是相關的CSS。
.menuButton {
display: block;
color: #FFFFFF;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: normal;
text-transform: uppercase;
background-image: url(../images/menuItems/Rosary-Bead-Icon.png);
background-position: left center;
background-repeat: no-repeat;
padding-left: 2.7em;
margin-left: 15px;
float: left;
}
.menuButton a:Link ,a:Visited,a:Active, a:Hover{
display: block;
color: #FFFFFF;
font-size: 1.1em;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: normal;
text-transform: uppercase;
background-position: left center;
background-repeat: no-repeat;
text-decoration: none;
}
.Buttons a:Link ,a:Visited,a:Active,a:Hover{
text-decoration: none;
color: #FFF;
background-image: url(../images/menuItems/buttons/largeBlueUp.png);
height: 57px;
width: 250px;
font-family: Tahoma, Geneva, sans-serif;
font-size: 1.1em;
color: #FFF;
text-decoration: none;
line-height: 55px;
background-repeat: no-repeat;
display: block;
text-align: center;
}
抱歉,我對頁面的其他問題分心。 答案恰好在您共享的代碼中:
.Buttons a:Link ,a:Visited,a:Active,a:Hover
和
.menuButton a:Link ,a:Visited,a:Active, a:Hover{
讀取:-按鈕a:Link-a:Visited-a:Active-a:Hover
改成:
.Buttons a:Link, .Buttons a:Visited, .Buttons a:Active, .Buttons a:Hover {
和
.menuButton a:Link, .menuButton a:Visited, .menuButton a:Active, .menuButton a:Hover {
正如您正在做的那樣,將樣式應用於所有懸停狀態。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.