html - 具有较高 z 索引的 DIV 在单击包含 Silverlight 对象的具有较低 z 索引的 div 时会隐藏

标签 html css silverlight-5.0 window-resize

我在一个表单中有 2 个 div,我希望其中一个 div 始终 float 在另一个 div 之上。 id 为“help”的 div 显示帮助按钮。当我导航到该页面时,帮助 div 位于第二个 div 的顶部,但如果我单击第二个 div 上的任意位置,第一个 div 就会隐藏。如果我调整窗口大小,它会再次出现。

注意:第二个 div 扩展到父级的整个宽度和高度。

<body>
 <form id="form1" runat="server" style="height:100%; display:flex; flex-
    flow:column; ">
    <div id="help" style="position:absolute; z-index:1;">
    </div>
    <div style="position:absolute;z-index:0;">
      <!-- Here there is a Silverlight component -->
    </div>
 </form>
</body>

最佳答案

解决这个问题的方法是在 silverlight 对象中将“Windowless”设置为 true。

 <param value="true" name="windowless"/>

根据微软文档,在无窗口模式下,Silverlight插件没有自己的渲染窗口。相反,插件内容直接由浏览器窗口显示。这使得 Silverlight 内容能够在视觉上与 HTML 内容重叠和混合。

https://technet.microsoft.com/pt-br/library/cc838156(v=vs.95).aspx

关于html - 具有较高 z 索引的 DIV 在单击包含 Silverlight 对象的具有较低 z 索引的 div 时会隐藏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46554996/

相关文章:

jquery - 灯箱图片大小限制

mvvm - 在 Prism EventAggregator 中发布没有 PayLoad 的事件?

html - 需要在 wordpress 中将 h1 设置为 h3

vb.net - 如何通过 Visual Basic 控制台应用程序登录网页

html - 允许在表格上水平滚动,底部始终可见

Javascript Pie Ch

security - 在浏览器中运行时启用 Silverlight 5 应用程序的提升信任,无需添加注册表项

c# - mscorlib 5.0.5.0 中缺少 System.Security.Cryptography.RSA

javascript - 使用 html5、jquery、ajax 比较日期

html - 在 li 元素内的 DIV 中使用边距 'auto' 时,DIV 在 IE7 和 IE6 上消失