IE 7 和 8 没有显示完美的设计视图 [英] IE 7 and 8 not showing perfect design view

查看:23
本文介绍了IE 7 和 8 没有显示完美的设计视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 IE 7、8 中遇到问题.

I have a problem in IE 7, 8.

我正在展示 3 个产品/行,分别在 Firefox、Chrome、Opera 和 IE 9、10、11 中

I am showing 3 products / row, in Firefox, Chrome, Opera and IE 9,10,11

它向我展示了完美的设计.但是在 IE 7,8 中它改变了完整的产品设计.

It shows me perfect design. BUT in IE 7,8 it change complete product design.

我不知道如何在 IE 7、8 中获得完美的产品视图

I don't get any idea how to get perfect product view in IE 7, 8

我该怎么做?

推荐答案

我非常讨厌 IE,尤其是 6、7 和 8 版.当你设计一个 wordpress 主题时,你必须设置两次样式,一次是为了合适的浏览器,一次是那么对于IE古人.要记住的另一件大事,这些古人不支持媒体查询.

I absolutely hate IE, specially versions 6, 7 and 8. When you are designing a wordpress theme, you have to style it twice, once for proper browsers and then for the IE ancients. The other big thing to remember, these ancients don't have support for media queries.

因此,要解决您的问题,请创建一个名为 ie.css 的样式表.您将使用它来为 IE 7 和 8 设置所有样式.

So to solve your problem, create a stylesheet called ie.css. You will use this to do all your styling for IE 7 and 8.

接下来您需要将该样式表加入队列,但我们将有条件地将其加入队列.此样式表只会加载到 IE8 的 IE 版本.所以在你的functions.php中,添加以下内容

Next you will need to enqueue that stylesheet, but we will enqueue it conditionally. This stylesheet will only load for IE versions up to IE8. So in your functions.php, add the following

function enqueque_ie_stylesheet() {
// Load the Internet Explorer specific.  stylesheet.
 wp_enqueue_style( 'style-ie',   get_template_directory_uri() . '/ie.css',   array(), '' );
    wp_style_add_data( 'style-ie', 'conditional', 'lt IE 9' );
 }
add_action( 'wp_enqueue_scripts', 'enqueue_ie_stylesheet' );

您现在可以在 ie.css 中添加样式.如果您使用的是子主题,请记住将 get_template_directory_uri 更改为 get_stylesheet_directory_uri

You can now add your styles in ie.css. Just remember to change get_template_directory_uri to get_stylesheet_directory_uri if you are using a child theme

这篇关于IE 7 和 8 没有显示完美的设计视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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