CSS 링크선택자 (a:active) : CSS1 (모든 주요 브라우저에서 지원)
링크를 클릭하는 순간의 스타일 줄 때 사용
링크 클릭 전엔 a:link 스타일 영향 받아 파란색이다,
링크를 클릭하는 순간 a:active 스타일 영향으로 파란색 배경에 흰색 글씨로 변합니다. 되도록, 아래 순서 꼭 지키세요 ! ^!~
<style>
a:link {color: blue; text-decoration: none;}
a:visited {color: purple; text-decoration: none;}
a:hover {color: red; text-decoration: underline;}
a:active {color: white; background-color: blue;}
</style>
<a href="#">홈짱닷컴</a>
주의 a:active 스타일은 반드시 a:hover 스타일 뒤 에 와야 합니다. 아래처럼 a:hover 앞에 오면 a:hover 영향을 받게 됩니다.
<style>
a:link {color: blue; text-decoration: none;}
a:visited {color: purple; text-decoration: none;}
a:active {color: white; background-color: blue;}
a:hover {color: red; text-decoration: underline;}
</style>
<a href="#">홈짱닷컴</a>
:active 스타일은 input 요소에도 사용 가능 . input:focus 에서 함께 설명 http://www.homzzang.com/css/23
주소 복사
랜덤 이동