본문으로 바로가기

파일의 IT 블로그

  1. Home
  2. 웹/HTML + CSS
  3. [CSS] a 태그 마우스 갖다댈때만 밑줄(underline) 표시하기

[CSS] a 태그 마우스 갖다댈때만 밑줄(underline) 표시하기

· 댓글개 · KRFile
<!DOCTYPE html>
<html>
<head>
<style>
a:link {
  text-decoration: none;
}

a:visited {
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:active {
  text-decoration: underline;
}
</style>
</head>
<body>

<p><b><a href="default.asp" target="_blank">This is a link</a></b></p>
<p><b>주목:</b> a:hover은 a:link 와 a:visited 정의 이후에 등장해야 합니다
<p><b>주목:</b> a:active 은 a:hover 정의 이후에 등장해야 합니다</p>

</body>
</html>
a:link 방문 전 링크 상태
a:visitied 방문 후 링크 상태
a:hover 마우스 오버시 상태
a:active 클릭 했을때 상태

 

 

출처

www.w3schools.com/css/css_link.asp

 

CSS Styling Links

CSS Links With CSS, links can be styled in different ways. Text Link Text Link Link Button Link Button Styling Links Links can be styled with any CSS property (e.g. color, font-family, background, etc.). In addition, links can be styled differently dependi

www.w3schools.com

 

SNS 공유하기
💬 댓글 개
이모티콘창 닫기
울음
안녕
감사해요
당황
피폐

이모티콘을 클릭하면 댓글창에 입력됩니다.