Home  >  Article  >  Web Front-end  >  IE6不支持:hover伪类效果的解决办法_html/css_WEB-ITnose

IE6不支持:hover伪类效果的解决办法_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:00:06777browse

   :hover是在CSS中用来制作效果最常用到的一个伪类,比如:标签或div上的鼠标悬停效果 li:hover,div:hover等.   但这种效果是css2及以上版本才添加的,对于只支持css1的浏览器就显示不出来。   在IE6中只兼容a:hover,要使用li:hover或div:hover,需引用一个文件使其兼容: <strong>  csshover.htc  </strong> (点击直接查看)   放在网站的根目录下,并在css文件(或者<style>标签)中,加上   body   {        behavior:url("...csshover.htc");    }    放在其他目录下也行, <strong>注意路径</strong> 对即可<strong>。</strong>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn