私は PhoneGap/Cordova を使用して Windows Phone アプリを開発しています (ただし、私が抱えている問題により、PhoneGap は無関係であると考えられます)。私が何をしているように見えても、HTML ページのタグが画面を垂直方向に埋めません。Chrome または IE でページを実行すると問題なく表示されます。これはエミュレーターでの表示です。何が起こっているのかを強調するために、.css のタグに青い境界線を追加しました。
本体のcssは次のとおりです。
body{
border: 1px blue solid;
}
html, body{
height:100%;
min-height:100%
}
フッターCSSは次のとおりです。
div.navbar_table_container {
width: 100%;
height: auto;
position: absolute;
bottom: 0;
background-image:url(images/bottom-nav.png);
background-size:100% 100%;
background-repeat:no-repeat;
text-align: center;
}
重要かもしれませんが、xaml ファイルは次のとおりです。
<phone:PhoneApplicationPage
x:Class="CordovaWP8_2_7_01.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
Background="White"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True" d:DesignHeight="820" d:DesignWidth="480"
xmlns:my="clr-namespace:WPCordovaClassLib">
<Grid x:Name="LayoutRoot" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<my:CordovaView HorizontalAlignment="Stretch"
Margin="0,0,0,0"
x:Name="CordovaView"
VerticalAlignment="Stretch" />
<Image Source="SplashScreenImage.jpg"
x:Name="SplashImage"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch">
<Image.Projection>
<PlaneProjection x:Name="SplashProjector" CenterOfRotationX="0"/>
</Image.Projection>
</Image>
</Grid>
</phone:PhoneApplicationPage>
重要な注意点は、Chrome、IE、および Android アプリとして実行すると、希望どおりに動作することです。
私が見つけた最も近い質問は Phonegap Windows Phone gap space bottom でしたが、そこの答えは役に立ちません。
最近、Web サーバーから同じコードを実行し、Windows Phone で IE を使用してアクセスすると、問題なく表示されることに気付きました。ただし、アラートが電話に表示されるたびに、IE のアドレス バーが消え、ネイティブ アプリが常に表示されているため、Web コンテンツの下部から電話の下部までの正確なギャップが残ることに気付きました。
つまり、それが「アプリ」であっても、html と javascript を実行している場合、電話は使用されていなくてもアドレスバー用のスペースを残していると私は信じています。
どんな助けや洞察も大歓迎です。