トランプが表示されるクロムを使用してhtmlファイルをロードすると、トランプの画像を表示するだけの単純なcssファイルを含む単純なhtmlファイルがあります。ただし、WebView を使用して同じ html ファイルを読み込むと、画像がありません。背景色を設定するだけで問題なく動作するため、html と css が正しく読み込まれて動作するため、問題は画像の URL にあると想定しています。足りないものはありますか?
ありがとう、
ジョン
アセット game.html gamecss3.css 画像 ssk.png
Java コード
webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("file:///android_asset/game.html");
CSS
body {
background: #aaa;
}
/* defines styles for each card */
.card {
width: 72px;
height: 96px;
margin: 20px;
background: url("images/ssK.png");
/*background: #efefef; */
position: absolute;
-webkit-transition: all 1s linear;
}
HTML シンプルカードゲーム
トランプゲーム
<section id="game">
<div id="cards">
<div id="card1" class="card"></div>
</div> <!-- #cards -->
</section> <!-- #game -->
<footer>
<p>This is an example of transitioning cards.</p>
</footer>
</body>
</html>