2011-05-03 10 views
2

이 코드의 문제점은 무엇입니까? CSS가 작동하지 않습니다.css 문제

<style type="text/css"> 
    .mail a:link { 
     color: grey; 
    } 

    .mail a:visited { 
     color: grey; 
    } 

    .mail a:hover { 
     color: white; 
    } 
</style> 

<a class="mail" href="mailto:[email protected]">E-mail: [email protected]</a> 

답변

7

a.mail보십시오.

은 아래에 스타일 정의를 변경

:

<style type="text/css">  
    a.mail:link {   
     color: grey;  
    }  

    a.mail:visited {   
     color: grey;  
    }  

    a.mail:hover {   
     color: white;  
    } 
</style> 
+0

해결 감사합니다. – anvd

+0

접선 팁 : .mail (http://moorer.me/jP97GR)을 사용하는 것이 더 효율적입니다. 마찬가지로 unvisited 링크에 대한 링크를 생략 할 수 있습니다. – morewry

3

'a'는 .mail의 자손이 아닙니다.

귀하의 CSS 스타일이 .mail의 자손과 클래스 이름 메일이되지 앵커 요소 요소를 앵커에 적용