Link with class in CSS
Now let the links themselves have a class:
html<a href="#" class="eee">link</a>
<a href="#" class="eee">link</a>
<a href="#" class="eee">link</a>
Let's set styles for links that have this class:
cssa:link.eee, a:visited.eee {
color: red;
}
a:hover.eee {
text-decoration: none;
}
It doesn't matter in what order you write the reference class and state pseudo-classes. You can rearrange them and nothing will change:
cssa.eee:link, a.eee:visited {
color: red;
}
a.eee:hover {
text-decoration: none;
}
Задание 1
Explain what the selector in the code below selects. Then write the HTML code that matches that selector. Here's the code with the selector:
cssa.zzz {
color: red;
}
a.zzz:hover {
text-decoration: none;
}
Задание 2
Explain what the selector in the code below selects. Then write the HTML code that matches that selector. Here's the code with the selector:
css#block a.zzz {
color: red;
}
#block a.zzz:hover {
text-decoration: none;
}
Задание 3
Explain what the selector in the code below selects. Then write the HTML code that matches that selector. Here's the code with the selector:
css.block a.zzz {
color: red;
}
.block a.zzz:hover {
text-decoration: none;
}