誰かがチェックボックスをクリックすると、下部にメッセージを表示しようとしています。
<style>
.stick {
background-color: red;
height: 60px;
position: fixed;
width: 100%;
left: 0;
}
</style>
<div class="col-md-12" id="compare" style="stick; display:none;">
<div class="separator"></div>
<div class="alert alert-info text-md-center">
<span class="text-md-center">
<button class="btn">
My message
</span>
</div>
</div>
<script>
function showProductsCompare() {
document.getElementById('compare').style.display = "block";
}
</script>
今までは、コードが挿入されるとメッセージがページに表示されます。
しかし、私はこのページhttps://www.homedepot.com/s/french%2520door%2520refrigerators?NCNI-5のような粘着性のあるメッセージを作成しようとしました(チェックボックスをクリックします。
私は例を見つけられないか、それを作るために。
ありがとうございました。
これで作業が完了します。
.stick {
background-color: red;
height: 60px;
position: fixed;
width: 100%;
left: 0;
buttom: 0;
}
divに「スティック」のクラスを与える必要があります。
<div class="col-md-12 stick" id="compare" style="stick; display:none;">
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加