Javascript 引导模式背景淡入问题
我尝试了这个解决方案:Javascript 引导模式背景淡入问题,javascript,jquery,html,css,twitter-bootstrap,Javascript,Jquery,Html,Css,Twitter Bootstrap,我尝试了这个解决方案:https://stackoverflow.com/questions/22056147/bootstrap-modal-backdrop-remaining 但没有解决办法 我第一次在屏幕上尝试diplay bootstraps模式,第二次完全完美,但背景更暗(错误) 用这两条线 这是我的js $(".Ok").modal("show"); $("#alert").on("hidden.bs.modal", function () {
https://stackoverflow.com/questions/22056147/bootstrap-modal-backdrop-remaining
但没有解决办法
我第一次在屏幕上尝试diplay bootstraps模式,第二次完全完美,但背景更暗(错误)
用这两条线
这是我的js
$(".Ok").modal("show");
$("#alert").on("hidden.bs.modal", function () {
$(this).removeClass("Ok");
});
注意:“Ok”类是从json数据动态生成的
在第二个模式中单击“关闭”按钮后,它会显示较暗的叠加背景
它会在html中显示这一点
这是我的html
<div id="alert" class="modal fade {{popupBtn1Txt}}">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<p>{{popupErrMsg}}</p>
</div>
<div class="modal-footer text-center">
<button type="button" id="btnc" class="btn btn-default" data-dismiss="modal" aria-hidden="true">{{popupBtn1Txt}}</button>
</div>
</div>
</div>
</div>
{{popupermsg}}
{{popubtn1txt}}
{{popubtn1txt}->“Ok”是通过jSON的handlebarjs支持动态生成的
我不想要黑色覆盖背景我将id称为动态数据,并在弹出窗口使用结束后删除id。 同样,如果需要,它将从json响应中动态添加id,并使用触发器删除覆盖和循环
$("#Ok").modal("show");
$('#Ok').on('hidden.bs.modal', function () {
$('.bg_limegreen').trigger('click');
$(".modal").attr("id","");
});
我将id称为动态数据,并在弹出窗口使用结束后删除id。 同样,如果需要,它将从json响应中动态添加id,并使用触发器删除覆盖和循环
$("#Ok").modal("show");
$('#Ok').on('hidden.bs.modal', function () {
$('.bg_limegreen').trigger('click');
$(".modal").attr("id","");
});
所以用CSS改变背景:。模式背景{背景颜色:透明;}这不是背景问题。你的OP说“我不想要黑色叠加背景”。所以用CSS改变背景:。模式背景{背景颜色:透明;}这不是背景问题。你的OP说“我不想要黑色叠加背景”.