javascript
  • jquery-plugins
  • noty
  • 2014-03-07 41 views 2 likes 
    2

    是否有设置noty通知的高度和宽度。 这是目前我的代码:我将如何设置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 
         }); 
    
    +0

    您是否尝试过使用CSS设置.noty_message的宽度和高度? – krowe

    回答

    2

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

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

    没有为我工作,我把这个放在顶部和底部,不知道为什么没有工作,我使用notypackaged.js,我用!重要的是用css –

    +0

    @EdathadanChiefakaArun看到我的答案。 – synaptik

    0

    这应该强制它是100像素:

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

    我会测试它。 –

    相关问题