Today & Tomorrow...

勝手気ままな、備忘録的な感じです。

【CSS04】

【CSS04】
リンクの背景色(擬似クラス)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<meta http-equiv="Content-Style-Type"content="text/css"/>
<title></title>
<style type="text/css">
ul{
list-style-type:none;
}
li a{
display:block;
color:white;
font-size:1.5em;
font-weight:bold;
width:300px;
padding:2px 10px;
margin:2px 0px;
text-decoration: none;
}
li a:link{
background-color:coral;
}
li a:visited{
background-color:turquoise;
}
li a:hover{
background-color:skyblue;
}
li a:active{
background-color:lawngreen;
}
</style>

</head>
<body>
<ul>
<li><a href="#">LINK-link-coral</a></li>
<li><a href="#">LINK-link-visited-turquoise</a></li>
<li><a href="#">LINK-link-hover-skyblue</a></li>
<li><a href="#">LINK-link-active-lawngreen</a></li>
</ul>

</body>
</html>