【问题标题】:How to make a notice with fade in and fade out如何使用淡入淡出制作通知
【发布时间】:2018-01-08 00:41:41
【问题描述】:

我希望在此通知信息被取代时淡入和淡出。

我仍然使用相同的源代码,但我仍然无法检索淡入淡出效果。

为了实现它,我缺少什么部分?

谢谢!

更多信息可以在http://bootstrap-notify.remabledesigns.com/阅读

jsfiddle 和 jsbin 中的源代码相同,但它只适用于 jsbin。

https://jsfiddle.net/qenn83yg/

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

$.notify({
	title: "Welcome:",
	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>

【问题讨论】:

标签: jquery twitter-bootstrap-3 bootstrap-notify


【解决方案1】:

试试这个代码

添加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

【讨论】:

  • 感谢您的帮助!不知何故,我看不到整个通知消息。
  • 如果您有兴趣,可以在bootstrap-notify.remabledesigns.com阅读有关淡入淡出的内容
  • 上面更新了DEMO。现在可以看到整个通知信息了。
  • 感谢您的帮助!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-03-09
  • 1970-01-01
  • 2021-12-06
  • 2016-02-07
  • 2011-12-09
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多