デジタルドラムセットを作成しようとしています。私はドラムセットのイメージを持っており、各ドラムに丸いヒットパッドを配置したい。私はビューのサイズを変更するときにヒットパッドを所定の位置に保つのが難しいです。私はdivを適切な位置に保つためにブートストラップを使ってみましたが、リサイズはヒットパッドを左に積み重ねるだけで動作しないことを発見しました。表示サイズが変わると、ドラムセットの背景画像の上にCSSを使用してヒットパッドを維持する方法はありますか?以下は現在のHTMLとヒットパッドを配置しようとしているドラムセットのイメージです。助けをよろしくお願いします。CSSを使用したスティッキーディビジョン位置
<div class="container">
<div class="row">
<div class="col-md-12 col-sm-12">
<img id="playboard" src="drums.png" alt="">
<div class="row" style="height: 100px">
</div>
<div class="row" style="height: 50px">
</div>
<div class="row" style="height: 50px">
</div>
<div class="row" style="height: 50px">
<div class="col-md-4 col-sm-4">
<button class="hit hihathit animated pulse infinite" ng-audio="hihat.mp3" start="0.1"></button>
</div>
<div class="col-md-4 col-sm-4">
<button class="hit crashhit animated pulse infinite" ng-audio="crash.mp3" start="0.1"></button>
</div>
<div class="col-md-4 col-sm-4">
<button class="hit ridehit animated pulse infinite" ng-audio="ride.mp3" start="0.1"></button>
</div>
</div>
<div class="row" style="height: 50px">
<div class="col-md-6 col-sm-6">
<button class="hit tomonehit animated pulse infinite" ng-audio="tomone.mp3" start="0.1"></button>
</div>
<div class="col-md-6 col-sm-6">
<button class="hit tomtwohit animated pulse infinite" ng-audio="tomtwo.mp3" start="0.1"></button>
</div>
</div>
<div class="row" style="height: 50px">
</div>
<div class="row" style="height: 50px">
<div class="col-md-4 col-sm-4">
<button class="hit snarehit animated pulse infinite" ng-audio="snare.mp3" start="0.1"></button>
</div>
<div class="col-md-4 col-sm-4">
<button class="hit kickhit animated pulse infinite" ng-audio="kickdrum.mp3" start="0.1"></button>
</div>
<div class="col-md-4 col-sm-4">
<button class="hit floortomhit animated pulse infinite" ng-audio="floortom.mp3" start="0.1"></button>
</div>
</div>
</div>
</div>
</div>
こんにちは、html5キャンバス要素で遊んでみましたか?divsを使用するよりも良いかもしれません - 方法によって非常にクールなプロジェクトです。 –
私は持っていません!私はそれを徹底的に調べます。ありがとう:) –
私はキャンバスを見て、私は同じ問題に遭遇するように見えます。私はJavascriptを使用してそれらを描画することができますが、CSSを使用してそれらを配置する必要があります。しかし、提案をありがとう。 –