IE9 文档模式切换修复了 SharePoint CSS 问题?
我正在开发我的第一个 SharePoint 项目,提供一些用户体验支持。我客户的页面使用一些自定义 CSS,包括带有下拉子菜单的水平主菜单。当页面在 IE9 中加载时,所有子菜单都无法正常工作。当您将鼠标悬停在顶级项目上时,会出现下拉菜单,但当您将光标向下放到子菜单时,悬停不会注册,菜单也会消失。
这些链接在最新版本的 Chrome 和 Firefox 中工作正常,所以我很确定这是 IE 的怪癖。在 IE9 中,如果我打开开发人员工具并将文档模式从 IE9 切换到 IE7,然后返回 IE9,则菜单在浏览器选项卡的剩余生命周期内正常工作(例如,当我使用子菜单导航到其他页面时) ,下拉菜单继续正常工作)。不幸的是,由于这是 SharePoint,我对这里的 html 结构没有太多控制权。
有人知道会发生什么吗?有谁知道将浏览器模式切换到 IE7 并返回的影响以及为什么这可以解决问题?谢谢!
I'm working on my first SharePoint project doing some UX support. My client's page uses some custom css including a horizontal main-menu with dropdown sub-menus. When the page is loaded in IE9, none of the sub-menus work correctly. The dropdowns appear when you hover over the top-level item but when you drop your cursor down to the sub-menu, the hover doesn't register and the menu disappears.
These links work fine in latest versions of Chrome and Firefox, so I'm pretty sure this is an IE quirk. In IE9, if I open the developer tools and toggle the document mode from IE9 to IE7 and then back to IE9, the menus work correctly for the remainder of the browser tab's lifetime (e.g. when I use the sub-menus to navigate to other pages, the dropdowns continue to function properly). Unfortunately, since this is SharePoint, I don't have a lot of control over the structure of the html here.
Anyone know what might be going on? Does anyone know the impact of toggling the browser modes to IE7 and back and why that might fix the problem? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
试试这个:
它会强制 IE8、IE9 等像 IE7 一样渲染。
Try this:
It will force IE8, IE9 etc to render as if they were IE7.