最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to make alerts fade out in Bootstrap 3? - Stack Overflow

programmeradmin1浏览0评论

I'm using Bootstrap alerts,i tried multiple ways to make them fade out but it didn't work. This is the code:

<div class='col-sm-7 alert alert-success' id='alrt' role='alert'>
<i class='fa fa-check fa-fw'></i>
<b>Etudiant ajouté avec succés</b>
</div>

the alert show up automatically when opening the page.

I'm using Bootstrap alerts,i tried multiple ways to make them fade out but it didn't work. This is the code:

<div class='col-sm-7 alert alert-success' id='alrt' role='alert'>
<i class='fa fa-check fa-fw'></i>
<b>Etudiant ajouté avec succés</b>
</div>

the alert show up automatically when opening the page.

Share Improve this question asked Apr 1, 2015 at 12:46 user4738222user4738222 3
  • stackoverflow./questions/7643308/… – Sagar Naliyapara Commented Apr 1, 2015 at 12:48
  • stackoverflow./questions/7676356/… – Sagar Naliyapara Commented Apr 1, 2015 at 12:48
  • stackoverflow./questions/22138967/… – Sagar Naliyapara Commented Apr 1, 2015 at 12:48
Add a ment  | 

1 Answer 1

Reset to default 5

you can add '.in' class, alert fade out.

<div class="alert alert-info fade in">
<a class="close" data-dismiss="alert" href="#"></a>
<p>message inside alert goes here</p>
</div>
发布评论

评论列表(0)

  1. 暂无评论