If I use a class for a normal div, can I write the css like:
.messagebc:hover {
...
}
Is it legal?
See Question&Answers more detail:osIf I use a class for a normal div, can I write the css like:
.messagebc:hover {
...
}
Is it legal?
See Question&Answers more detail:osIt's ineffiecient to use :hover on non-link elements.
Avoid the :hover pseudo-selector for non-link elements for IE clients.
If you use :hover on non-anchor elements, test the page in IE7 and IE8 to be sure your page is usable. If you find that :hover is causing performance issues, consider conditionally using a JavaScript onmouseover event handler for IE clients.
:hover pseudo-selector to non-link elements is a very ineffiecient selector (e.g): For example:
h3:hover {...}
.foo:hover {...}
#foo:hover {...}
div.faa :hover {...}
The :hover pseudo-selector on non-anchor elements is known to make IE7 and IE8 slow in some cases*. When a strict doctype is not used, IE7 and IE8 will ignore :hover on any element other than anchors. When a strict doctype is used, :hover on non-anchors may cause performance degradation.