加1按钮无法在IE9中正确显示 [英] Plus 1 button doesn't render properly in IE9

查看:105
本文介绍了加1按钮无法在IE9中正确显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近注意到我公司网站上的加号1按钮在IE 9和10中无法正确显示.按钮的底部.兼容模式无济于事.是否有任何技巧可以在按钮周围定位或滑动以使其正确显示?我尝试将代码放在表中,但这根本无济于事,段落或中断也没有.

I noticed recently the Plus 1 button on my company's website doesn't render properly in IE 9 and 10. Looks perfect in Chrome, but can't seem to get it to show up in IE without a chunk being cut off the bottom of the button. Compatability Mode doesn't help. Any tricks to position or pad around the button so it shows up properly? I tried putting the code in table but that didn't help at all, nor does paragraph or break.

在IE和Chrome中都可以正确显示"Facebook赞"按钮.

Facebook Like button shows up correctly in both IE and Chrome.

Windows Server 2008,IIS 7.5,使用开发者网站上生成的代码.

Windows Server 2008, IIS 7.5, using the code generated on the developer site.

谢谢

推荐答案

您只需添加以下代码,浏览器就会强制进入IE8模式(正确呈现):

You can just add the following code and the browser will force to IE8 mode (which renders correctly):

将此添加到HTML的顶部:

Add this to the top of your HTML:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

将此添加到HTML的头部

Add this to the head section of your HTML

    <meta http-equiv="X-UA-Compatible" content="IE=8" />

该按钮将正确呈现.请参见此处的实时示例.

The button will then render correctly. See a live example here.

这篇关于加1按钮无法在IE9中正确显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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