Please see below two, Could anyone explain to me the difference a.class and class.a:
.MyClass a:link, .MyClass a:visited {
color:red;
}
a.MyClass :link, a.MyClass :visited {
color:green;
}
Please see below two, Could anyone explain to me the difference a.class and class.a:
.MyClass a:link, .MyClass a:visited {
color:red;
}
a.MyClass :link, a.MyClass :visited {
color:green;
}
a.class refers to a a tag (link) which has the class class.
.class a refers to a a tag inside any tag which has the class class.
<div class="class">
<a>Link</a>
</div>
<a class="class">Link</a>
.class a {
// This will affect the first chunk
}
a.class {
// This will affect the second chunk
}