我正在尝试在 SharePoint 2013 中使用 toastr js 来显示通知。一切看起来都很棒,直到我在 toastr 选项中添加 closebutton:true。尽管标题、消息和关闭按钮的对齐方式失真,但出现关闭按钮。知道实现出了什么问题吗?
带关闭按钮
没有关闭按钮
最佳答案
这是因为 SharePoint (core15.css
) 为 button
声明了 min-width
属性:
input[type=button], input[type=reset], input[type=submit], button {
min-width: 6em;
}
解决方案
CSS:
button.toast-close-button {
min-width: 0;
}
jQuery:
$('button.toast-close-button').css('min-width',0);
结果
关于javascript - 使用 SharePoint 的 toastr js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25804391/