Is :hover:after supported in IE8?

心已入冬 提交于 2019-12-05 19:46:28

in your :after:hover rule add content:"";. this will force a redraw

What does your doctype look like?

IE8 does handle pseudo-selector but if you don't have a strict doctype the :hover selector will only work on anchors.

A couple of great options:

  • Use a shim. This lets you retro-fit (due the cascading nature of css) and fix 'older browser lack of support' issues. For example: http://selectivizr.com/

  • Use jQuery 1.8.1+ which provides support for these kind of things for older browsers.

In the end, I had to write some Javascript to control the hover event of that element and style the element that way. It's not quite perfect in IE8, but it worked.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!