Javascript 如何设置noty通知的高度和宽度

Javascript 如何设置noty通知的高度和宽度,javascript,jquery-plugins,noty,Javascript,Jquery Plugins,Noty,是否有设置noty通知的高度和宽度的方法。 这是我目前的代码: $(document).ready(function () { noty({ layout: 'topRight', type: 'alert', text: "<a href='C:\\Users\\dah\\Documents\\AlertJqueryNP\\alertjquery.html' target='_blank'>A

是否有设置noty通知的高度和宽度的方法。 这是我目前的代码:

$(document).ready(function () { 
        noty({
            layout: 'topRight',
            type: 'alert',
            text: "<a href='C:\\Users\\dah\\Documents\\AlertJqueryNP\\alertjquery.html' target='_blank'>Alerts:"+count+"</a>",
            template: '<div class="noty_message"><span class="noty_text"></span></div>',
            closeWith: ['button'],
            dismissQueue: true, 
            timeout: false
        });
$(文档).ready(函数(){
诺蒂({
布局:“右上角”,
键入:“警报”,
正文:“,
模板:“”,
closeWith:[“按钮”],
是的,
超时:false
});

你可以用CSS来做。无论你想要什么宽度和高度,只要在CSS中设置,它就会工作

.noty-message{
    width:100px;
    height:100px;
}

你可以用CSS来做。无论你想要什么宽度和高度,只要在CSS中设置它,它就会工作

.noty-message{
    width:100px;
    height:100px;
}

这将强制其为100px:

#noty_topRight_layout_container,
#noty_topRight_layout_container > li,
#noty_bar, #noty_type_alert           {
    width: 100px !important;
}

这将强制其为100px:

#noty_topRight_layout_container,
#noty_topRight_layout_container > li,
#noty_bar, #noty_type_alert           {
    width: 100px !important;
}
我的解决方案:

.noty_layout > .noty_bar {
    height: 100px;
}
我的解决方案:

.noty_layout > .noty_bar {
    height: 100px;
}

对于org.webjars.bower.noty:3.1.4,布局为:

<div id="noty_layout__bottomRight" ....
</div>
要在css中更改宽度,请执行以下操作:

#noty_layout__bottomRight {
   width: 350px !important;
}

对于org.webjars.bower.noty:3.1.4,布局为:

<div id="noty_layout__bottomRight" ....
</div>
要在css中更改宽度,请执行以下操作:

#noty_layout__bottomRight {
   width: 350px !important;
}

你试过使用CSS设置.noty_消息的宽度和高度吗?你试过使用CSS设置.noty_消息的宽度和高度吗?对我不起作用,我把它放在顶部和底部,不知道为什么不起作用,我使用的是notypackage.js,我用过!对css@EdathadanChiefakaArun看到我的答案了吧。对我来说不管用,我把这个放在顶部和底部,不知道为什么不工作,我用的是notypackaged.js,我用的!对css@EdathadanChiefakaArun看看我的答案。我会测试它。我会测试它。