我很努力將subheader添加到基於標籤的Ionic應用程序中。問題在於,Android中未顯示subheader,但在iOS中顯示。Ionic:Subheader不會顯示在基於標籤的Android應用程序中
我想用的子報頭的一個搜索欄,這樣它不滾動走與內容婁它。
步驟來重現問題:
- 創建基於選項卡項目的測試應用程式:
ionic start subheader-test tabs
- 修改
.\subheader-test\www\templates\tab-dash.html
到在「狀態」選項卡上添加子標題,使其看起來像文件波紋管: - 開始離子的實驗室:
<ion-view view-title="Dashboard">
<ion-header-bar class="bar-subheader bar-balanced">
<h1 class="title">Subheader</h1>
</ion-header-bar>
<ion-content class="padding">
<h2>Welcome to Ionic</h2>
<p>
....
</p>
</ion-content>
</ion-view>
ionic serve -l
我的has-subheader
和has-header
歸類組合測試ion-content
,但它是徒勞無功。
在我測試的任何瀏覽器(Chrome,Firefox,IE 11)中,子標題未顯示在應用程序的Android版本中。
我使用了帶CSS樣式的選項 - 有用。非常感謝你,我沒有想到我很快得到了正確的答案。 –