I want to select anchor tags in CSS. For this purpose, in the next html document, I did the same.
My html document is here:
</head>
<body>
<div class="first">
<center> <a href="http://www.google.com">The first link </a></center>
</div>
<div class="second">
<center> <a href="http://www.fb.com"> The second link </a></center>
</div>
<div class="third">
<center> <a href="http://www.stackoverflow.com"> The third link </a></center>
</div>
</body>
Now I want to select all the tags. I tried this way:
body a:first-child:hover
{
font-size:30px;
color:yellow;
}
body a+a:hover
{
font-size:40px;
color:red;
}
body a+a+a:hover
{
font-size:50px;
color:
}
But I get the wrong result, what should I do?
source
share