jquery - getbodyclass IE Issue magento(IE 不参加这个类(class),但在 mozilla 和 chrome 中它工作正常)

标签 jquery html css magento

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->getLang() ?>" lang="<?php echo $this->getLang() ?>" dir="ltr">
<?php echo $this->getChildHtml('head') ?>
<body<?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?> class="background_art" 
<?php if($ruqest_uri !=$home_uri2 and $ruqest_uri !=$new_url and $ruqest_uri !=$new_uri ){ echo "style='background:none;'";  }?> <?php if($snv=="no"){ ?> onload="firsttimeload()" <?php } ?> >

 <?php echo $this->getChildHtml('after_body_start') ?>
<?php echo $this->getChildHtml('header') ?>

最佳答案

问题是这个

<body <?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?> class="background_art" ....>

产生

你需要把它改成

<body <?php echo $this->getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?> class="background_art <?php echo $this->getBodyClass()? $this->getBodyClass() : ''; ?>" ...>

然后就会产生

<body class="background_art ..something.." ...> 

关于jquery - getbodyclass IE Issue magento(IE 不参加这个类(class),但在 mozilla 和 chrome 中它工作正常),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28471890/

相关文章:

javascript - 希望为新网页创建可滑动/可拖动区域

javascript - PHP 在单选按钮单击时显示文本框

javascript - 类和带有函数的 this

html - 将图像从特定位置重复到另一个特定位置

jquery - 切换正在工作,但为什么

javascript - 什么时候用javascript封装?

javascript - 绑定(bind)页面高度变化的事件

html - Bootstrap 4 行不对齐中间

html - 如何在不相互替换的情况下垂直添加帖子

html - 在 CSS 中创建带有右对齐标签和左对齐值的两列布局