我用过Magnific-popup在我的 jsp 中向用户显示一些消息。
我用来打开 magnific popup 的代码如下:
$.magnificPopup.open({
items: {
type: 'inline',
src: '#idOfSomeDivInPage'
},
focus: '#someButtonId',
closeOnBgClick: false,
enableEscapeKey: false
}, 0);
有没有办法使用 jquery 和 css 删除/隐藏
出现在 magnific 弹出窗口右上角的“X”按钮?
最佳答案
您可以使用 showCloseBtn
配置,如 doc 中所述.
显示关闭按钮
Controls whether the close button will be displayed or not.
$.magnificPopup.open({
items: {
type: 'inline',
src: '#idOfSomeDivInPage'
},
focus: '#someButtonId',
closeOnBgClick: false,
enableEscapeKey: false,
showCloseBtn:false
}, 0);
请在此处检查工作codepen
关于javascript - 如何隐藏放大弹出窗口中的默认 'X' 关闭按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58447645/