0
現在、私はウェブページの下部にポップアップのようなモーダルを使用しています。モーダルが開いているときにnav-bar、bodyをクリックできません。
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">WebSiteName</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="index.html">Home</a></li>
<li><a href="page1.html">Page 1</a></li>
</ul>
</div>
</nav>
<div class="modal fade" id="slide-bottom-popup" data-backdrop="false">
<div class="modal-body">
<button id="close" type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
<h4>Cennos Commandments</h4>
<ul>
<li>Commandments 1</li>
<li>Commandments 2</li>
<li>Commandments 3</li>
<li>Commandments 4</li>
</ul>
</div><!-- /.modal-body -->
</div><!-- /.modal -->
私は身体をクリックするか、選択することができます前に、私は最初のモーダルを閉じるために持っていることを実感モーダル
.modal.fade.in .modal-body {
bottom: 0;
opacity: 1;
}
.modal-body {
position: absolute;
bottom: -250px;
right: 0%;
padding: 30px 15px 15px;
width: 275px;
height: 250px;
background-color: #e5e5e5;
border-radius: 6px 6px 0 0;
opacity: 0;
-webkit-transition: opacity 0.3s ease-out, bottom 0.3s ease-out;
-moz-transition: opacity 0.3s ease-out, bottom 0.3s ease-out;
-o-transition: opacity 0.3s ease-out, bottom 0.3s ease-out;
transition: opacity 0.3s ease-out, bottom 0.3s ease-out;
}
.close {
margin-top: -20px;
text-shadow: 0 1px 0 #ffffff;
}
body.modal-open {
overflow: scroll;
}
スクリプトは、ページのロード
$(document).ready(function() {
setTimeout(function() {
$('#slide-bottom-popup').modal('show');
}, 0); // milliseconds
});
にそれがオープンにするためのCSSまたはnav-barを押して他のページに移動します。とにかく私はモーダルを開いたままにしておくことができ、同時にボディ、ナビゲーションバーを同時に使用できますか?
私の悪い英語を申し訳ありません。ありがとうございます。
私は申し訳ありませんが、モーダルの右側にのみ機能します。モーダルポップアップが中央にある場合は、モーダルの右側をクリックするだけで、左側はまだ無効になっています。 –
@SaoHo:更新された回答を確認してください。これはあなたのために働くことを望みます。 –
ここで動作しています。私はモーダルボックスが開いていても、背景とやりとりすることができます。 –