2017-08-01 36 views
1

當通知信息取代時,我希望淡入淡出。如何通過淡入淡出進行通知

我仍然使用相同的源代碼,但我仍然無法檢索淡入淡出效果。

爲了實現它,我缺少了哪些部分?

謝謝!

更多信息可以在的jsfiddle和jsbin http://bootstrap-notify.remabledesigns.com/

相同的源代碼來讀取,但它只能在jsbin工作。

https://jsfiddle.net/qenn83yg/

http://jsbin.com/cofigosute/edit?html,js,output

$.notify({ 
 
\t title: "Welcome:", 
 
\t message: "This plugin has been provided to you by Robert McIntosh aka mouse0270" 
 
});
<!DOCTYPE html> 
 
<html> 
 
<head> 
 
    <meta charset="utf-8"> 
 
    <meta name="viewport" content="width=device-width"> 
 
    <title>JS Bin</title> 
 
</head> 
 
<body> 
 
    
 
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> 
 
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/bootstrap-notify.min.css" rel="stylesheet" type="text/css" /> 
 
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/bootstrap-notify.min.css" rel="stylesheet" type="text/css" /> 
 
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-notify/0.2.0/css/styles/alert-blackgloss.min.css" rel="stylesheet" type="text/css" /> 
 

 

 

 
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
 
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script> 
 
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script> 
 

 
    
 
    
 
    
 

 
    
 
    
 
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/highlight.min.js"></script> 
 

 
<script src="http://bootstrap-notify.remabledesigns.com/js/bootstrap-notify.min.js"></script> 
 

 
</body> 
 
</html>

+0

這個腳本「https://cdnjs.cloudflare.com/ajax/libs/notify/0.4。 2/notify.js「不存在於github的引導程序通知列表中(https://github.com/mouse0270/bootstrap-notify) –

+0

當你已經應用了錯過的腳本,整個通知消息不顯示。 –

+0

你可以閱讀更多的信息在「http://bootstrap-notify.remabledesigns.com/」 –

回答

0

試試這個代碼

添加animate.css

https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.css

修改後的代碼

$.notify({ 
    title: "Welcome:", 
    message: "This plugin has been provided to you by Robert McIntosh aka mouse0270", 
    animate: { 
     enter: 'animated fadeInDown', 
     exit: 'animated fadeOutUp' 
    } 
}); 

DEMO

+0

謝謝你的幫助!不知何故,我無法看到整個通知消息。 –

+0

如果您有興趣,可以在http://bootstrap-notify.remabledesigns.com/ –

+0

上面更新DEMO,瞭解淡入淡出。現在您可以看到整個通知消息。 – Amal