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

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

问题描述

我在IE 7,8有问题。



我在Firefox,Chrome,Opera和IE上显示3个产品/行9,10,11



它显示我完美的设计。但在IE 7,8中它改变了完整的产品设计。



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

$

解决方案

我绝对讨厌IE,特别是版本6, 7和8.当你设计一个wordpress主题,你必须两次,一次适当的浏览器,然后为IE的古代。另一件大事要记住,这些古人不支持媒体查询。



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



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

  function enqueque_ie_stylesheet(){
//加载Internet Explorer特定。样式表。
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


I have a problem in IE 7, 8.

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

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

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

How can i do this ?

解决方案

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.

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.

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' );

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天全站免登陆