动态HTML呈现问题只在IE9中 [英] Dynamic HTML rendering issue in IE9 only

查看:95
本文介绍了动态HTML呈现问题只在IE9中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只在IE9中有这个讨厌的渲染问题,IE8& IE7与其他浏览器一样正常工作。



http://jsfiddle.net/65Zsv/



在IE9中打开演示并将鼠标悬停在图像上。问题是,在IE9中,位于图像下方的文本呈现出工件。



我能够通过强制IE9进入IE8兼容模式来解决该错误,但仍然得到了卡在我的脑海里,我正在寻找一个真正的解决方案。





PS我没有安装IE10,我不知道这个bug是否也会出现在那里......

该错误可以通过将文本包装在块级标签中解决。更新你的小提琴,Bug就会消失:

 < html> 
< head>< / head>
< body>
< div class =itemBtn>< img src =http://a3.mzstatic.com/us/r1000/029/Video/ad/b9/e4/mzi.sporozgs.100x100- 75.jpg><峰; br> < p> IIII这是一些疯狂的文字< / p>< / div>< / body>
< / html>

我不知道< body>中的文字规则。标记,但我认为它必须在某个点上处于块级元素中。这可能是一个比MS错误更加无效的标记。


I have this nasty rendering issue in IE9 only, IE8 & IE7 works fine as the rest of the browsers.

http://jsfiddle.net/65Zsv/

Open the demo in IE9 and hover over the image. The problem is that in IE9 the text located under the image renders with artifacts.

I was able to resolve the bug by forcing IE9 into IE8 compatibility mode, but still this got stuck in my mind and I am looking for a real resolution.

P.S. I don't have IE10 installed and I wonder if the bug will be there as well...

解决方案

This bug can be resolved by wrapping the text in a block-level tag. Update your fiddle as so and the bug goes away:

<html>
<head></head>
<body>
<div class="itemBtn"><img src="http://a3.mzstatic.com/us/r1000/029/Video/ad/b9/e4/mzi.sporozgs.100x100-75.jpg"><br>    <p>IIII THIS IS SOME CRAZY TEXT</p></div></body>
</html>

I don't know the rules about text in the <body> tag, but I think it has to be in a block level element at some point. It's probably more a case of invalid markup than an MS bug.

这篇关于动态HTML呈现问题只在IE9中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆