2017-12-11 13 views
0

cssスタイルを適用してnotify.jsアラートを適用する方法を知る必要があります。私はこのためにいくつかのスタイルを適用する必要がnotify.jsアラートメッセージのスタイルを適用する方法

$.notify({ 
    message: "Alert!" 
}, { 
    type: 'danger', 
    animate: { 
    enter: 'animated fadeInUp', 
    }, 
    placement: { 
    from: "top", 
    align: "center" 
    }, 
    offset: 20, 
    spacing: 10, 
    z_index: 1031, 
}); 

-

は、ここに私のコードです。

+0

'$ .notify.addStyle()'はあなたの友人です。ここで、ドキュメントを読んでください:https://notifyjs.com – Stavm

答えて

0
$.notify({ 
    message: "Alert!" 
}, { 
    type: 'danger', 
    animate: { 
    enter: 'animated fadeInUp', 
    }, 
    placement: { 
    from: "top", 
    align: "center" 
    }, 
    offset: 20, 
    spacing: 10, 
    z_index: 1031, 
    style: 'addClassName' 
}); 

、このような構造はnotifiy

<div class="notifyjs-addClassName-base notifyjs-addClassNamesuccess"> 
    <div class="clearfix"> 
     <div class="title" data-notify-html="title">Would you like some Foo ? 
     </div> 
     <div class="buttons"> 
     <button class="no">Cancel</button> 
     <button class="yes" data-notify-text="button">Confirm</button> 
     </div> 
    </div> 
    </div> 

のHTMLに建設され、その後、あなたはあなたの必要性に従って1つのCSS filrを作成し、基本クラス

としてこの .notifyjs-addClassName-baseを作るCSSを追加することができます
.notifyjs-addClassName-base{ 

} 
関連する問題