Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use li:hover or div:hover to make IE6 support: hover effect

Shulou Source: shulou.com Published: 2022-06-03 08:29:49 11月15日 Update

This article introduces the knowledge of "how to use li:hover or div:hover to make IE6 support: hover effect". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Hover is one of the most commonly used pseudo-classes in CSS to make effects, such as the mouse hover effect li:hover,div:hover on tags or div.

However, this effect is only added in css2 and above, and cannot be displayed in browsers that only support css1.

Only a:hover is compatible in IE6. To use li:hover or div:hover, refer to a file to make it compatible:

Csshover.htc (click to view directly)

Put it in the root directory of the website, and in the css file (or tag), add

The code is as follows:

Body

{

Behavior:url (".. csshover.htc")

}

You can also put it in another directory, just pay attention to the path pair.

That's all for "how to use li:hover or div:hover to make IE6 support: hover effects". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Tags: Effects support content files more tags knowledge websites practicality learning next use code dilemma reality situation articles is in the root directory case Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Information Apple Linux NVidia