Bootstrap 4模态在Internet Explorer之外的浏览器上都可以正常工作...我尝试删除运气不好的类,但没有运气,还尝试了JS解决方案
$(function () {
var isIE = window.ActiveXObject || "ActiveXObject" in window;
if (isIE) {
$('.modal').removeClass('fade');
}
});
<!-- MODAL -->
<div class="modal fade" id="modal-video" tabindex="-1" role="dialog"
aria-labelledby="modal-video-label">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<div class="modal-video">
<div class="embed-responsive embed-responsive-16by9">
<video id="sample-video" controls>
<source src="video/main.mp4" type="video/mp4">
Your browser is not supported
</video>
</div>
</div>
</div>
</div>
</div>
</div>
<!--END MODAL -->
仍然没有运气。...有人遇到这个问题并找到了可行的解决方案?
单击按钮时出现控制台错误:
Uncaught Error: Syntax error, unrecognized expression: #
at Function.Sizzle.error (jquery-3.3.1.js:1541)
at Sizzle.tokenize (jquery-3.3.1.js:2193)
at Sizzle.select (jquery-3.3.1.js:2620)
at Function.Sizzle [as find] (jquery-3.3.1.js:845)
at jQuery.fn.init.find (jquery-3.3.1.js:2873)
at new jQuery.fn.init (jquery-3.3.1.js:2983)
at jQuery (jquery-3.3.1.js:139)
at HTMLAnchorElement.<anonymous> (script.js:30)
at HTMLAnchorElement.dispatch (jquery-3.3.1.js:5183)
at HTMLAnchorElement.elemData.handle (jquery-3.3.1.js:4991)