Jump to content

[SOLVED] Alternative to a:hover?


random1

Recommended Posts

I read that using 'a:hover' is bad practice in CSS and that it is recommended that you use a snippet of Javascript to achieve the hover affect.

 

The reason that they gave is that the ':hover' part causes the DOM to load slowly.

 

Is this right? Any better version in CSS to have the same effect for a simple #navmenu element?

Link to comment
https://forums.phpfreaks.com/topic/163458-solved-alternative-to-ahover/
Share on other sites

Whoever said that didn't really know what they were talking about:

 

a) I've never noticed it to place that much of a load on the DOM

b) Using javascript requires that the user has javascript turned on, and the javascript itself is more likely to be much heavier on your processing power than the :hover element.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.