我正在尝试将通知窗口/通知的宽度更改为 800 像素,但我做不到。 This is window with default width
我添加到我的 .css 文件:
.noty-message{
width:800px;
height:800px;
}
什么都没有改变。当我尝试添加
.noty_bar {
width: 800px;
}
然后我的窗口看起来像that .如何设置 noty 对象的宽度?
最佳答案
我是你正在使用 layout: 'topRight'
和 type: 'alert'
,这将强制它们为 800 像素宽:
#noty_topRight_layout_container,
#noty_topRight_layout_container > li,
#noty_bar, #noty_type_alert {
width: 800px !important;
}
如果您想为其他布局和通知类型更改它,则必须更改“topRight”和“alert”子字符串,但这种方法应该有效。
关于javascript - Noty.js - 设置 noty 对象的宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39526510/