請參考this question瞭解我正在嘗試做什麼。唯一的例外是我使用ApplicationLayout,我想要PlaceBar下方的工具欄。有沒有辦法讓CSS顯示PlaceBar下方的工具欄,然後在滾動時將它保留在頁面的頂部? 或者,如何修復ApplicationLayout的頂部(即PlaceBar,TitleBar等),以便它們不滾動?在ApplicationLayout中浮動工具欄?
2
A
回答
4
更新:擴展此構思以製作XSnippet。 Download it from here。
要修復應用程序佈局的頂部部分(比如地方欄,標題欄),您需要查看應用程序佈局控件生成的HTML頁面的CSS(Google Chrome具有Inspect Element的重要功能)。它使用類似lotusTitleBar
,lotusPlaceBar
,lotusContent
等等,您可以在自定義CSS中使用這些類來創建浮動工具欄。
因此,讓我們假設這是您的XPage應用程序佈局控制從擴展庫。
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">
<xp:this.resources>
<xp:styleSheet href="/cssAppLayoutFloatingMenu.css"></xp:styleSheet>
</xp:this.resources>
<xe:applicationLayout id="applicationLayout1">
<xp:panel>
Sample Text. 1
<xp:br></xp:br>
Sample Text. 2
<xp:br></xp:br>
Sample Text. 3
<xp:br></xp:br>
Sample Text. 4
</xp:panel>
<xe:this.configuration>
<xe:oneuiApplication titleBarName="Sample Title" placeBarName="Sample Place">
<xe:this.footerLinks>
<xe:basicContainerNode label="Container 1">
<xe:this.children>
<xe:basicLeafNode label="Link 1" href="/"></xe:basicLeafNode>
<xe:basicLeafNode label="Link 2" href="/"></xe:basicLeafNode>
</xe:this.children>
</xe:basicContainerNode>
<xe:basicContainerNode label="Container 2">
<xe:this.children>
<xe:basicLeafNode label="Link 1" href="/"></xe:basicLeafNode>
<xe:basicLeafNode label="Link 2" href="/"></xe:basicLeafNode>
</xe:this.children>
</xe:basicContainerNode>
</xe:this.footerLinks>
<xe:this.placeBarActions>
<xe:pageTreeNode label="Page 1"></xe:pageTreeNode>
<xe:pageTreeNode label="Page 2"></xe:pageTreeNode>
</xe:this.placeBarActions>
</xe:oneuiApplication>
</xe:this.configuration>
</xe:applicationLayout>
</xp:view>
你可以使用這個CSS使標題欄和地點吧浮動
.lotusTitleBar {
/*Class for Title bar*/
position: fixed;
width: 100%;
height: 45px;
z-index: 100;
}
.lotusPlaceBar {
/*Class for Place bar*/
position: fixed;
width: 100%;
z-index: 100;
top: 45px; /*Start after height of lotusTitleBar*/
height: 35px;
}
.lotusContent {
/*Class for Content*/
position: relative;
top: 80px; /*Height of lotusTitleBar + Height of lotusPlaceBar*/
}
注:這是一個只有標題欄和地方的酒吧非常基本的例子。如果您在應用程序佈局中包含橫幅或其他元素,則必須相應地進行修改。
相關問題
- 1. tinymce工具欄浮動工具欄
- 2. 在XPages中浮動工具欄/操作欄/按鈕欄?
- 3. jquery中的浮動菜單工具欄
- 4. 防止dxBarManager工具欄浮動
- 5. MFC浮動工具欄始終有效
- 6. 帶浮動工具欄的QDialog
- 7. 針浮動動作按鈕到工具欄/動作欄
- 8. 如何在wpf中創建對接(浮動)工具欄
- 9. 如何在PyQt4中添加一個浮動工具欄到QFrame?
- 10. 如何在Qt 4.5.2中設計浮動工具欄
- 11. 如何使Visual Studio 2010中的工具欄浮動?
- 12. MFC:浮動工具欄窗口中不可見(WS_EX_TOOLWINDOW)
- 13. 把一個浮動工具欄在錶行
- 14. 在tinyMCE工具欄上的右側浮動按鈕
- 15. 動畫工具欄
- 16. 拖動工具欄
- 17. 如何在IntelliJ中移動工具欄?
- 18. CSS浮動工具條
- 19. 在工具欄
- 20. Excel 2007浮動格式工具欄自定義
- 21. 如何爲iPhone/iPad應用程序創建浮動工具欄?
- 22. 實現Android工具欄的浮動下拉麪板
- 23. 當用戶關閉浮動工具欄框架時檢測到
- 24. 複製谷歌加浮動工具欄菜單
- 25. jQuery/CSS浮動/覆蓋工具欄/按鈕
- 26. 用於文本選擇控件的Custoom浮動工具欄
- 27. WPF Popup的行爲就像辦公室的浮動工具欄
- 28. 片段佈局接管工具欄和浮動按鈕
- 29. 有沒有第三方浮動工具欄?
- 30. 工具欄與浮動操作按鈕重疊
謝謝!我有更多的CSS工作來玩,但這是我所需要的。 –