2013-06-07 2 views
0

좋아요. 잠시 동안 링크를 설정하고 호버 효과를 밑줄을 사용하여 색 변경으로 변경하기로 결정했습니다. 색깔이 변하지 않는 이유를 이해하지 못합니다. 나는 변경하는 경우 : 작동 밑줄 호버 텍스트 장식하지만, 색상은 그냥 내가 설정 한 일반 링크 색상 (# 747474) 다른 곳위로 이동했을 때 링크가 바뀌지 않습니다

.footerList { 
    display: inline; 
    padding: 0 9px 0 9px; 
} 
.footerList a:link { 
    text-decoration: none; 
    color: #747474; 
    font-family: arial; 
    font-size: 11px; 
    font-weight: normal; 
    padding: 0; 
    margin: 0; 
} 
.footerList a:visited { 
    text-decoration: none; 
    color: #747474; 
    font-family: arial; 
    font-size: 11px; 
    font-weight: normal; 
    padding: 0; 
    margin: 0; 
} 
.footerList a:hover { 
    text-decoration: none; 
    color: red; 
    font-family: arial; 
    font-size: 11px; 
    font-weight: normal; 
    padding: 0; 
    margin: 0; 
} 
.footerList a:active { 
    text-decoration: none; 
    color: red; 
    font-family: arial; 
    font-size: 11px; 
    font-weight: normal; 
    padding: 0; 
    margin: 0; 
} 

<ul id="footerUlContainer"> 
<li class="footerList"><a href="privacy.php">Privacy Policy</a></li> 
<li class="footerList"><a href="tos.php">Terms of Service</a></li> 
<li class="footerList"><a href="tou.php">Terms of Use</a></li> 
<li class="footerList"><a href="tou.php">Businesses</a></li> 
</ul> 
+0

사용하려고 규칙! 호버 – 22kar

+0

디버깅을 수행하기위한 색상 옆에 중요합니다. 원하는 효과를 얻을 때까지 다른 모든 스타일을 제거한 다음 다른 스타일을 다시 도입하십시오. – meagar

+1

솔직히 말해서,이 작품은 나를 위해 - [피들] (http://jsfiddle.net/Xpc7V/). – Paul

답변

3

아마도 당신의 스타일이되고있는 재정을 말한다, 나는 chrome dev tools 사용하는 것이 좋습니다, 어쨌든 다음을 시도하십시오.

#footerUlContainer > .footerList a:hover { 
    text-decoration: none; 
    color: red; 
    font-family: arial; 
    font-size: 11px; 
    font-weight: normal; 
    padding: 0; 
    margin: 0; 
} 

여기에있는 작업은 demo입니다.

아소 특이성에 더 익숙해이 blog 체크 아웃이

+0

고마워! footerUlContainer가 내 호버에 미치는 영향을 무시했다는 것을 알았습니다 –

+0

기쁘게 생각합니다 :) :)! 유용한 답변을 찾으면 upvoting 및 accepting을 고려하여 다른 사용자에게 유용합니다. :) – isJustMe

관련 문제