Javascript 引导模式-将背景移到模式之外
我集成了一个小插件,它将animate.css动画添加到引导模式中。但是,当模式在中设置动画时,背景也会在中设置动画,如图所示 在插件演示中,背景显示在模式之外 如何复制这种行为? 我的JS&HTML与我看到的示例相同Javascript 引导模式-将背景移到模式之外,javascript,jquery,twitter-bootstrap,twitter-bootstrap-3,bootstrap-modal,Javascript,Jquery,Twitter Bootstrap,Twitter Bootstrap 3,Bootstrap Modal,我集成了一个小插件,它将animate.css动画添加到引导模式中。但是,当模式在中设置动画时,背景也会在中设置动画,如图所示 在插件演示中,背景显示在模式之外 如何复制这种行为? 我的JS&HTML与我看到的示例相同 $('body').append(template(options)); el = $("#"+options.id); el.modal({ animateIn: 'fadeInDown', animateOut: 'fadeOutLeft' }); HT
$('body').append(template(options));
el = $("#"+options.id);
el.modal({
animateIn: 'fadeInDown',
animateOut: 'fadeOutLeft'
});
HTML:
<div class="modal {{#if icon}}with-icon{{/if}}" id="{{id}}" tabindex="-1" role="dialog" aria-labelledby="{{id}}Label" aria-hidden="true">
<div class="modal-dialog {{size}}">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<i class="icons8-{{icon}} icon"></i>
<h4 class="modal-title">{{title}}</h4>
</div>
<div class="modal-body">
{{{content}}}
</div>
{{#if buttons}}
<div class="modal-footer">
{{#each buttons}}
<button type="button" class="btn {{class}}" data-dismiss="modal">{{label}}</button>
{{/each}}
</div>
{{/if}}
</div>
</div>
</div>
&时代;
{{title}}
{{{content}}}
{{{#如果按钮}
{{{#每个按钮}
{{label}}
{{/每个}}
{{/if}
我们可以查看您的其余代码吗?你在哪里定义el
?我用我的JS和HTML编辑了答案。这是一个把手编译模板。