だから私は視聴者の画面サイズに基づいて要素のサイズを変更する必要があるプログラムを書いています。プログラムは jsp / sql/ xhtml / css にありますが、いくつか質問があります。
画面幅をjsp変数に保存してcssファイルを選択する方法はありますか?
div を別の div の下に配置し、上記の div を一種のコンテナとして使用する方法はありますか? この質問は少し複雑です
目標: 画像の下にテキスト ラベルを付けること。問題: div は親 div の一部であり、div は画面サイズに基づいて変更される画像を提供します。
これが私がやっていることのようなものです。
<div id="container">
<div id="inner">
<div class="1">--stuff</div>
<div class="2"><img src="server:8080/project?minutes=720&width=<%= out.print(width) %> </div> <-- want to align under this
<div class="3">--stuff</div>
</div>
<div id="label"> <--Want this div aligned underneath "2"
<div class="1">2.0</div> <-- Want the text at 25% of the image (right)
<div class="2">4.0</div> <-- Want the text at 50% of the image (right)
<div class="3">6.0</div> <-- Want the text at 75% of the image (right)
<div class="4">8.0</div> <-- Want the text at 100% of the image (right)
</div>
</div>