Internet explorer 如何显示IE7特定的内容?
我一直试图显示一个IE7特定的标签,但它似乎不起作用。我知道这应该是非常简单的,所以希望有人能够提供帮助。这是我的密码:Internet explorer 如何显示IE7特定的内容?,internet-explorer,internet-explorer-7,Internet Explorer,Internet Explorer 7,我一直试图显示一个IE7特定的标签,但它似乎不起作用。我知道这应该是非常简单的,所以希望有人能够提供帮助。这是我的密码: <!--[if IE 7]> <div class="fb-comments" data-href="<?= FB_URL; ?>" data-num-posts="2" data-width="700"></div> <![endif]--> <!--[if gt IE 7]><!--> &
<!--[if IE 7]> <div class="fb-comments" data-href="<?= FB_URL; ?>" data-num-posts="2" data-width="700"></div> <![endif]-->
<!--[if gt IE 7]><!--> <div class="fb-comments" data-href="<?= FB_URL; ?>" data-num-posts="8" data-width="700"></div> <!--<![endif]-->
请您使用这些技术,如下所示。我给出了一些实施项目的示例:
所有浏览器都支持css方法
.测试
{
字体颜色:红色;
}
此方法仅适用于ie7浏览器:
.测试
{
*字体颜色:红色;
}
此方法仅适用于ie7和ie8浏览器:
.测试
{
字体颜色:红色\9;
}
遵循这些技巧,您就会得到结果。您好,谢谢您的回答,但是我不想根据浏览器来设置样式,而是显示特定于浏览器的内容。具体来说,IE7与此有什么不同?看起来只有num posts
值不同?我可以想出更好的方法来做这件事,但和其他任何事情一样,我很好奇你为什么要这么做?