IE 7/8渲染问题?

时间:2015-04-28 14:23:58

标签: css twitter-bootstrap internet-explorer-8 internet-explorer-7 haml

在ie8中,文档按预期呈现。 ie8 screenshot

在ie7中,文件不是 ie7 screenshot

(建立在带有额外css的bootstrap之上)

标记:

// C++11 or later
int n = std::stoi(s);

// Historically
int n = std::atoi(s.c_str());  // no error checking

std::istringstream ss(s);
if (ss >> n) {
     // success
}

额外的css:

.modal.fade.in#unsupported-browser-modal
  .modal-dialog
    .modal-content
      .modal-text
        .modal-header
          %h3.modal-title YOUR BROWSER IS OUT OF DATE
        .modal-body
          This website requires a minimum of Internet Explorer version 9 or the latest version of other popular web browsers.

另外,在可能感兴趣的情况下,document.compatMode似乎在ie7和i8中设置为相同的值。

关于我可能不会考虑什么的想法?

1 个答案:

答案 0 :(得分:0)

不确定它是不是您要找的东西。它也有点像黑客,所以除非没有人建议解决方案/你找不到解决方案,否则我不会建议。但试试:

_margin-top: 100px; /* ie7 only */

如果您对此感兴趣,可以阅读有关安全CSS黑客的更多信息:https://mathiasbynens.be/notes/safe-css-hacks#css-hacks