IT/css

CSS Links 배경색

조원태 2017. 2. 25. 02:18
반응형

CSS Links  배경색



background-color속성은 링크에 대한 배경 색상을 지정하는 데 사용할 수 있습니다 :


a:link {

    background-color: yellow;

}


a:visited {

    background-color: cyan;

}


a:hover {

    background-color: lightgreen;

}


a:active {

    background-color: hotpink;





<!DOCTYPE html>

<html>

<head>

<style>

a:link {

    background-color: yellow;

}


a:visited {

    background-color: cyan;

}


a:hover {

    background-color: lightgreen;

}


a:active {

    background-color: hotpink;

</style>

</head>

<body>


<p><b><a href="default.asp" target="_blank">This is a link</a></b></p>

<p><b>Note:</b> a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective.</p>

<p><b>Note:</b> a:active MUST come after a:hover in the CSS definition in order to be effective.</p>


</body>

</html>



반응형

'IT > css' 카테고리의 다른 글

CSS Links 스타일 링크  (0) 2017.02.25
CSS Links Text Decoration  (0) 2017.02.25
css 백분율과 em의 조합 사용  (0) 2017.02.20
css Em로 글꼴 크기 설정 Set Font Size With Em  (0) 2017.02.20
css Font Size 글자 크기  (0) 2017.02.20