强制asp:内容甚至div在滚动时保持在顶部?

时间:2012-04-30 20:34:17

标签: asp.net css

我有一个asp:content标签,里面有一个div:

<asp:Content ID="btnContent" ContentPlaceHolderID="ButtonContent" runat="server">
  <div id="dButtons" runat="server" visible="false">
    Some CONTENT
  </div>
</asp:Content>

当我向下滚动页面时,我不再看到此内容面板(div)。即使我向下滚动,有没有办法强制显示它。它应该始终是可见的。

1 个答案:

答案 0 :(得分:2)

在css中,即使正在滚动页面,position: fixed也会使元素保持不变。

相关问题