javascript
  • jquery-plugins
  • noty
  • 2014-03-07 44 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

    我會測試它。 –

    相關問題