HTML5 SHIV和显示:块

编程入门 行业动态 更新时间:2024-10-25 20:26:16
HTML5 SHIV和显示:块 - 但样式仍在IE中断[9-为什么?(HTML5 SHIV and display: block -but styles still break in IE<9- Why?)

如果我的网站在IE9中运行罚款,并且我已经包含了HTML5 SHIV代码,但CSS仍然在IE8,7中断,是否有一些显而易见的事情我应该首先解决?

这是我的网站,在IE9中正常工作,在IE 8-7中断(顶部导航失去格式,定位)。 http://bitstream.ca/beta3/#

我也包括在内

header,nav,article,footer,section,aside,figure,figcaption{display:block}

在我的页面CSS中

并且还包括我的CSS之后的shiv脚本,但仍然在我的头标记中根据此建议不能在IE中设置HTML5元素的样式(尽管shiv和display:block)

这些类型的CSS -IE错误很难为以前没有遇到过它们的人解决问题,

If my site works fines in IE9, and I've included the HTML5 SHIV code, but the CSS still breaks in IE8,7, are there some obvious things I should troubleshoot first?

Here is my site, works fine in IE9, breaks(the top nav loses formatting, positoning)in IE 8-7. http://bitstream.ca/beta3/#

I've also included

header,nav,article,footer,section,aside,figure,figcaption{display:block}

in my page CSS

And ALSO included the shiv script AFTER my CSS but still within my head tag as per this suggestion Can't style HTML5 elements in IE (despite shiv and display:block)

These types of CSS -IE bugs are pretty difficult to troubleshoot for anyone who hasn't come across them before,

最满意答案

在IE中使用开发者工具时,您需要确保更改文档模式以及浏览器模式,例如

测试IE7的设置 - 浏览器模式:IE7 文档模式:IE7标准

测试IE8的设置 - 浏览器模式:IE8 文档模式:IE8标准。

等等

When using the Developer Tools in IE you need to make sure you change both the Document Mode as well as the Browser Mode e.g.

Settings for testing IE7 - Browser Mode: IE7 Document Mode: IE7 Standards

Settings for testing IE8 - Browser Mode: IE8 Document Mode: IE8 Standards.

etc.

更多推荐

本文发布于:2023-08-05 23:23:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1441110.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:SHIV

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!