1

私は開発にまったく慣れていないので(これは私の最初のプロジェクトであり、学習しながら学んでいます)、これに対する非常に簡単な答えがあるかもしれません!

Appmobi XDK を使用して HTML で記述された、ラジオ局用の Android アプリケーションを作成しています。ステーションは、shoutcast アドレスを使用しますが、android がこれに対処するのに苦労していることを知っているので、オンラインで見つけた flash player テンプレート div 内にshoutcast IP を埋め込みました。ただし、div の HTML ページ上の位置を変更することはできません。常に左上に留まるか、消えます。TOP: LEFT などのスタイルと align:center を使用してみましたが、どちらも機能しませんでした。だから、ページ上の好きな場所に移動する方法を誰かが知っているのだろうかと思っています。

以下の div とコードの HTML を提供しました。誰かがこれを修正する方法を知っていれば、私は大いに義務付けられます! ありがとう!

  "<div id="container"> <a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.
 <a href="http://www.shoutcheap.com/shoutcast/">shoutcast server hosting</a>
 <a href="http://www.shoutcheap.com/icecast/">icecast server hosting</a></div>
 <script type="text/javascript" src="http://www.shoutcheap.com/flashplayer/swfobject.js"></script>
 <script type="text/css" style= "TOP:700; LEFT:250; ">
 var s1 = new SWFObject("http://www.shoutcheap.com/flashplayer/player.swf" ,
 "ply","250","50","9","#FFFFFF");
 s1.addParam("allowfullscreen","true");
 s1.addParam("allowscriptaccess","always");
 s1.addParam("flashvars",
 "file=http://50.7.244.222:10074/;stream.nsv&type=mp3&volume=50&autostart=true");
 s1.write("container");"
4

1 に答える 1

0

あなたのスタイルにこれを試してみてください

position: absolute;
left: 50%;
top: 700px; // distance from the top of the page
margin-left: -125px; // subtract half the width of the document to align center
于 2012-09-12T18:53:43.773 に答える